sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit b5cb49bce90bd4d37f08da6a65aba6a99cb7c608
parent c001a57e8bb2912bfce293e71d32fdbe246eae74
Author: Kirill Primak <vyivel@eclair.cafe>
Date:   Sat,  3 Jun 2023 07:43:13 +0300

xwayland: fix mapped state check in OR handlers

Diffstat:
Msway/desktop/xwayland.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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 wl_container_of(listener, surface, override_redirect); 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) { 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 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) { handle_unmap(&xwayland_view->unmap, NULL); }