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.
The rendered region size is independent on the output transform and
scale. Until now, an output with scale > 1 would render only its
(1 / scale) part; so with a scale of 2, only the top-left quarter (ie.
the left 1/2 of the top 1/2) would be visible.
Similarly, a portrait output (constructed as landscape, rotated by 90
degrees) would have an empty area at its bottom.
This bug was found while testing the output-management PR (#62).
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.
There is no technical reason not to allow resizing on opposite edges,
effectively getting single-directional interactive move (which can be
combined with another edge for resizing in the other direction).
The view jumped to the cursor position vertically.
While making this change, I also put some consistency into how position
and size are set (first the original ones are considered, and then only
updated as needed). It doesn't change the functionality, but is easier
to understand IMO.
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.
This allows the config to be exactly as verbose as kiwmi, or to change
the verbosity level at runtime (e.g. using kiwmic).
It uses numbers, because they are much easier to handle on both sides
and add only little inconvenience to the user.