mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-05 13:05:59 +01:00
xwm: don't do anything except mapping on MapRequest
Instead, move the wlr_xwayland_surface_set_withdrawn() and wlr_xwayland_surface_restack() calls to the MapNotify handler with an override_redirect check, as they are done too early. This mirrors the logic in the UnmapNotify handler and fixes a bug where wlr_xwayland_surface_restack() would be called on an o-r window after the following sequence of requests: - CreateWindow with override_redirect=True - ChangeWindowAttributes with override_redirect=False - MapWindow Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3770
This commit is contained in:
parent
4990ed99eb
commit
c3c7b1c9d0
1 changed files with 5 additions and 2 deletions
|
@ -1122,8 +1122,6 @@ static void xwm_handle_map_request(struct wlr_xwm *xwm,
|
|||
return;
|
||||
}
|
||||
|
||||
wlr_xwayland_surface_set_withdrawn(xsurface, false);
|
||||
wlr_xwayland_surface_restack(xsurface, NULL, XCB_STACK_MODE_BELOW);
|
||||
xcb_map_window(xwm->xcb_conn, ev->window);
|
||||
}
|
||||
|
||||
|
@ -1135,6 +1133,11 @@ static void xwm_handle_map_notify(struct wlr_xwm *xwm,
|
|||
}
|
||||
|
||||
xwm_update_override_redirect(xsurface, ev->override_redirect);
|
||||
|
||||
if (!xsurface->override_redirect) {
|
||||
wlr_xwayland_surface_set_withdrawn(xsurface, false);
|
||||
wlr_xwayland_surface_restack(xsurface, NULL, XCB_STACK_MODE_BELOW);
|
||||
}
|
||||
}
|
||||
|
||||
static void xwm_handle_unmap_notify(struct wlr_xwm *xwm,
|
||||
|
|
Loading…
Reference in a new issue