At the moment it isn't used at all and a lot of data is duplicated. This
is a temporary state introduced for nicer diff separation into several
commits.
With the migration to wlr_scene, some objects (desktop, output etc)
will no longer have any reason to care about individual shells and
similar; handling each one on its own would introduce code that is,
from their perspective, over-complicated.
Strata (sg. stratum; this name was chosen to avoid confusion with the
over-used 'layer') represent logical layers of surfaces on the desktop,
such as every layer shell layer, one for xdg shell, another for popups.
This is a preparation for switching to the wlroots scene-graph. There is
no replacement planned for output:redraw() because it will no longer be
necessary (as far as i can tell), while scene-compatible replacements
for the view pre_render/post_render events are planned.
This is needed in order for wlroots to interpret some values (mostly
coords of absolute input events) correctly. It for example fixes how the
pointer behaves with WLR_WL_OUTPUTS=2.
In order to also map the pointer/output pair when the pointer is created
before the output, a list of pointers has to be managed, which wasn't
needed until now.
Until now, focusing a different view didn't move pointer focus to it,
even though it was under the cursor. The pointer had to move in order
to switch its focus. Similar situations should be handled after this
commit.
This targets only surfaces under kiwmi_view, thus only XDG shell. Other
surfaces to be fixed later.
The new code here is copied over from wlroots, with only small
modifications.
This commit ensures that they also cause output damage to happen and
that popups are moved into the visible area.
I browsed the source code of Sway while writing this and took a lot of
inspiration and help from there.