mirror of
https://github.com/NickHu/sway
synced 2024-12-26 21:58:30 +01:00
xwayland: fix mapped state check in OR handlers
This commit is contained in:
parent
c001a57e8b
commit
b5cb49bce9
1 changed files with 2 additions and 2 deletions
|
@ -178,7 +178,7 @@ static void unmanaged_handle_override_redirect(struct wl_listener *listener, voi
|
||||||
wl_container_of(listener, surface, override_redirect);
|
wl_container_of(listener, surface, override_redirect);
|
||||||
struct wlr_xwayland_surface *xsurface = surface->wlr_xwayland_surface;
|
struct wlr_xwayland_surface *xsurface = surface->wlr_xwayland_surface;
|
||||||
|
|
||||||
bool mapped = xsurface->surface != NULL || xsurface->surface->mapped;
|
bool mapped = xsurface->surface != NULL && xsurface->surface->mapped;
|
||||||
if (mapped) {
|
if (mapped) {
|
||||||
unmanaged_handle_unmap(&surface->unmap, NULL);
|
unmanaged_handle_unmap(&surface->unmap, NULL);
|
||||||
}
|
}
|
||||||
|
@ -537,7 +537,7 @@ static void handle_override_redirect(struct wl_listener *listener, void *data) {
|
||||||
struct sway_view *view = &xwayland_view->view;
|
struct sway_view *view = &xwayland_view->view;
|
||||||
struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface;
|
struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface;
|
||||||
|
|
||||||
bool mapped = xsurface->surface != NULL || xsurface->surface->mapped;
|
bool mapped = xsurface->surface != NULL && xsurface->surface->mapped;
|
||||||
if (mapped) {
|
if (mapped) {
|
||||||
handle_unmap(&xwayland_view->unmap, NULL);
|
handle_unmap(&xwayland_view->unmap, NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue