aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/xwayland.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 89b1a481..3b42013b 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -95,7 +95,7 @@ static void unmanaged_handle_unmap(struct wl_listener *listener, void *data) {
if (seat->wlr_seat->keyboard_state.focused_surface == xsurface->surface) {
// This simply returns focus to the parent surface if there's one available.
// This seems to handle JetBrains issues.
- if (xsurface->parent &&
+ if (xsurface->parent && xsurface->parent->surface &&
wlr_surface_is_xwayland_surface(xsurface->parent->surface)) {
struct wlr_xwayland_surface *next_surface =
wlr_xwayland_surface_from_wlr_surface(xsurface->parent->surface);