xdg: support xdg-shell v3 with popup repositioning

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.
This commit is contained in:
John Lindgren 2024-06-27 19:17:38 -04:00 committed by Johan Malm
parent 45b197b8a4
commit a98f2635ea
4 changed files with 27 additions and 1 deletions

View file

@ -32,6 +32,7 @@ struct lab_layer_popup {
struct wl_listener commit;
struct wl_listener destroy;
struct wl_listener new_popup;
struct wl_listener reposition;
};
void layers_init(struct server *server);