See https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3514
which added support on the wlroots side.
We now re-run popup positioning (for both xdg-shell and layer-shell
popups) when the "reposition" event is received. This allows popups that
change size (such as qmpanel's applications menu) to be positioned
correctly.
xdg-shell v3 also gives the compositor some additional "hints" for popup
positioning (reactive, parent_size, and parent_configure_serial) which
are available but we don't make use of currently.
Use the following logic:
- Exclusive: Grant regardless of layer (previously it was only given if
in top or overlay layers) AND grant if in the same or higher layer
(nearer overlay) compared with other clients with exclusive
interactivity.
- On-demand: Grant only if no other layer-shell client has exclusive
keyboard interactivity. Previously it was treated the same as
exclusive.
- None: Unset focus if the commit associated with the 'none' came from
the currently focused layer. Previously it was just unset regardless.
Made all header files to have LABWC_ prefix in include guard identifers.
Converted from __LABWC_ in 35 include/ files.
Converted from __LAB_ in 5 include/ files.
Added LABWC prefix to 3 include/ files.
Added include guards to 3 include/ files.
The double underscores were removed since according to C standard
those "are always reserved for any use".
...and thus simplify the usage of wlr_scene_node_at(). Specifically:
- desktop.c: in get_cursor_context() use node-description for
layer-surfaces and layer-popups. This lays the foundations for a
pointer-enter-event being sent when a new layer-surfaces appears under
the pointer (even if the pointer doesn not move).
- layers.c:
* Iterate over `struct wlr_scene_tree *layer_tree[]` rather than
`struct wl_list layers[]` when arranging layers to avoid surfaces
being out of sync with nodes
* Set signal handlers after scene node creation to avoid configure
race conditions
* Handle scene-node destroy event rather than event of
`struct wlr_layer_surface_v1`
* Arrange layers on map and unmap
* Handle client request for layer-change
Fixes issue #667