diff options
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r-- | sway/desktop/xwayland.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index bb4340f1..a52cf4ad 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -178,7 +178,7 @@ static void unmanaged_handle_override_redirect(struct wl_listener *listener, voi | |||
178 | wl_container_of(listener, surface, override_redirect); | 178 | wl_container_of(listener, surface, override_redirect); |
179 | struct wlr_xwayland_surface *xsurface = surface->wlr_xwayland_surface; | 179 | struct wlr_xwayland_surface *xsurface = surface->wlr_xwayland_surface; |
180 | 180 | ||
181 | bool mapped = xsurface->surface != NULL || xsurface->surface->mapped; | 181 | bool mapped = xsurface->surface != NULL && xsurface->surface->mapped; |
182 | if (mapped) { | 182 | if (mapped) { |
183 | unmanaged_handle_unmap(&surface->unmap, NULL); | 183 | unmanaged_handle_unmap(&surface->unmap, NULL); |
184 | } | 184 | } |
@@ -537,7 +537,7 @@ static void handle_override_redirect(struct wl_listener *listener, void *data) { | |||
537 | struct sway_view *view = &xwayland_view->view; | 537 | struct sway_view *view = &xwayland_view->view; |
538 | struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface; | 538 | struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface; |
539 | 539 | ||
540 | bool mapped = xsurface->surface != NULL || xsurface->surface->mapped; | 540 | bool mapped = xsurface->surface != NULL && xsurface->surface->mapped; |
541 | if (mapped) { | 541 | if (mapped) { |
542 | handle_unmap(&xwayland_view->unmap, NULL); | 542 | handle_unmap(&xwayland_view->unmap, NULL); |
543 | } | 543 | } |