Skip to content

Commit

Permalink
xwayland: fix mapped state check in OR handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
vyivel authored and emersion committed Jun 3, 2023
1 parent c001a57 commit b5cb49b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sway/desktop/xwayland.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit b5cb49b

Please sign in to comment.