diff options
author | Kirill Primak <vyivel@eclair.cafe> | 2023-06-03 07:43:13 +0300 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-06-03 09:12:12 +0200 |
commit | b5cb49bce90bd4d37f08da6a65aba6a99cb7c608 (patch) | |
tree | 1eb60036b676bd922551a9bb260244ea469ea625 | |
parent | lock: listen to the correct map signal (diff) | |
download | sway-b5cb49bce90bd4d37f08da6a65aba6a99cb7c608.tar.gz sway-b5cb49bce90bd4d37f08da6a65aba6a99cb7c608.tar.zst sway-b5cb49bce90bd4d37f08da6a65aba6a99cb7c608.zip |
xwayland: fix mapped state check in OR handlers
-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 | } |