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);
This commit is contained in:
Tudor Brindus 2021-05-04 21:33:25 -04:00 committed by Simon Ser
parent e4d0ec9ee1
commit bfc69decdd
1 changed files with 0 additions and 1 deletions

View File

@ -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);
}