mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 14:15:58 +01:00
xwm: avoid restacking managed surfaces above OR surfaces
This is consistent with other X11 window managers (checked against i3 and mutter).
This commit is contained in:
parent
2eb225236e
commit
720e8ac26b
1 changed files with 13 additions and 5 deletions
|
@ -1055,6 +1055,18 @@ void wlr_xwayland_surface_restack(struct wlr_xwayland_surface *xsurface,
|
||||||
size_t idx = 0;
|
size_t idx = 0;
|
||||||
uint32_t flags = XCB_CONFIG_WINDOW_STACK_MODE;
|
uint32_t flags = XCB_CONFIG_WINDOW_STACK_MODE;
|
||||||
|
|
||||||
|
assert(!xsurface->override_redirect);
|
||||||
|
|
||||||
|
// X11 clients expect their override_redirect windows to stay on top.
|
||||||
|
// Avoid interfering by restacking above the topmost managed surface.
|
||||||
|
if (mode == XCB_STACK_MODE_ABOVE && !sibling) {
|
||||||
|
sibling = wl_container_of(xwm->surfaces_in_stack_order.prev, sibling, stack_link);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sibling == xsurface) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (sibling != NULL) {
|
if (sibling != NULL) {
|
||||||
values[idx++] = sibling->window_id;
|
values[idx++] = sibling->window_id;
|
||||||
flags |= XCB_CONFIG_WINDOW_SIBLING;
|
flags |= XCB_CONFIG_WINDOW_SIBLING;
|
||||||
|
@ -1067,11 +1079,7 @@ void wlr_xwayland_surface_restack(struct wlr_xwayland_surface *xsurface,
|
||||||
|
|
||||||
struct wl_list *node;
|
struct wl_list *node;
|
||||||
if (mode == XCB_STACK_MODE_ABOVE) {
|
if (mode == XCB_STACK_MODE_ABOVE) {
|
||||||
if (sibling) {
|
node = &sibling->stack_link;
|
||||||
node = &sibling->stack_link;
|
|
||||||
} else {
|
|
||||||
node = xwm->surfaces_in_stack_order.prev;
|
|
||||||
}
|
|
||||||
} else if (mode == XCB_STACK_MODE_BELOW) {
|
} else if (mode == XCB_STACK_MODE_BELOW) {
|
||||||
if (sibling) {
|
if (sibling) {
|
||||||
node = sibling->stack_link.prev;
|
node = sibling->stack_link.prev;
|
||||||
|
|
Loading…
Reference in a new issue