From bfc69decdd04f3350135cf489655c4216c5889d1 Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Tue, 4 May 2021 21:33:25 -0400 Subject: [PATCH] xwm: do not restack surfaces on activation Currently, upon activating a surface, wlroots restacks it on top of all others. This may not necessarily be correct from the calling compositor's point of view, where having focus may not imply being top-of-stack (e.g., focusing a window under an always-on-top window). In Sway's case, this means that focused tiling windows will always be on top of floating windows, at least in the order communicated to X11 apps. This breaks drag-and-drop from a focused tiling X11 window to a floating X11 window which partially obscures the former. This is a breaking change; to retain the previous behavior, users that were calling wlr_xwayland_surface_activate(xsurface, true); should now be calling wlr_xwayland_surface_activate(xsurface, true); wlr_xwayland_surface_restack(xsurface, NULL, XCB_STACK_MODE_ABOVE); --- xwayland/xwm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 49c2f908..516a061d 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -320,7 +320,6 @@ static void xwm_set_focus_window(struct wlr_xwm *xwm, xwm->last_focus_seq = cookie.sequence; } - wlr_xwayland_surface_restack(xsurface, NULL, XCB_STACK_MODE_ABOVE); xsurface_set_net_wm_state(xsurface); }