xwm: implement _NET_CLIENT_LIST_STACKING

This property is present on all modern X11 instances. The nonpresence of
it requires applications to fall back to XQueryTree-based logic to
determine stacking logic (e.g., to determine what surface should get
Xdnd events).

These code paths are effectively untested nowadays, so this makes it
more likely for wlroots to "break" applications. For instance, the
XQueryTree fallback path has been broken in Chromium for the last 10
years.

It's easy enough to maintain this property, so let's just do it.

Fixes #2889.
This commit is contained in:
Tudor Brindus 2021-05-02 12:50:36 -04:00 committed by Simon Ser
parent 699d724000
commit ae2f3ecb68
3 changed files with 76 additions and 28 deletions

View file

@ -80,6 +80,7 @@ enum atom_name {
DND_ACTION_ASK,
DND_ACTION_PRIVATE,
NET_CLIENT_LIST,
NET_CLIENT_LIST_STACKING,
ATOM_LAST // keep last
};
@ -106,7 +107,10 @@ struct wlr_xwm {
struct wlr_xwayland_surface *focus_surface;
// Surfaces in creation order
struct wl_list surfaces; // wlr_xwayland_surface::link
// Surfaces in bottom-to-top stacking order, for _NET_CLIENT_LIST_STACKING
struct wl_list surfaces_in_stack_order; // wlr_xwayland_surface::stack_link
struct wl_list unpaired_surfaces; // wlr_xwayland_surface::unpaired_link
struct wlr_drag *drag;