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

@ -14,7 +14,7 @@
#include "window-rules.h"
#include "workspaces.h"
#define LAB_XDG_SHELL_VERSION (2)
#define LAB_XDG_SHELL_VERSION (3)
#define CONFIGURE_TIMEOUT_MS 100
static struct xdg_toplevel_view *