aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTudor Brindus <me@tbrindus.ca>2021-05-02 12:50:36 -0400
committerSimon Ser <contact@emersion.fr>2021-05-31 10:41:29 +0200
commitae2f3ecb6824e168083580a601af53d6c9544b5d (patch)
tree53674408ed4a82b66b85e401d82319a3ca4208b8 /include
parent699d7240001c4d991a265c23d9c020a36df5f70d (diff)
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.
Diffstat (limited to 'include')
-rw-r--r--include/wlr/xwayland.h3
-rw-r--r--include/xwayland/xwm.h4
2 files changed, 6 insertions, 1 deletions
diff --git a/include/wlr/xwayland.h b/include/wlr/xwayland.h
index 7dcb3935..6a83e08a 100644
--- a/include/wlr/xwayland.h
+++ b/include/wlr/xwayland.h
@@ -121,7 +121,7 @@ struct wlr_xwayland_surface_size_hints {
/**
* This represents the input focus described as follows:
- *
+ *
* https://www.x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html#input_focus
*/
enum wlr_xwayland_icccm_input_model {
@@ -146,6 +146,7 @@ struct wlr_xwayland_surface {
uint32_t surface_id;
struct wl_list link;
+ struct wl_list stack_link;
struct wl_list unpaired_link;
struct wlr_surface *surface;
diff --git a/include/xwayland/xwm.h b/include/xwayland/xwm.h
index 05d229ae..d564a0e2 100644
--- a/include/xwayland/xwm.h
+++ b/include/xwayland/xwm.h
@@ -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;