From 295d5172d4a96cf1ee29d63ecefcf6a3e3ca1558 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Fri, 31 Dec 2021 02:58:34 +0000 Subject: [PATCH] desktop: Fix activating unmapped views This can happen sometimes in xwayland, need to guard against this. Signed-off-by: Joshua Ashton --- src/desktop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/desktop.c b/src/desktop.c index 0e683879..ba562c29 100644 --- a/src/desktop.c +++ b/src/desktop.c @@ -102,7 +102,8 @@ desktop_focus_and_activate_view(struct seat *seat, struct view *view) seat_focus_surface(seat, NULL); return; } - if (input_inhibit_blocks_surface(seat, view->surface->resource)) { + + if (view->surface && input_inhibit_blocks_surface(seat, view->surface->resource)) { return; } @@ -114,7 +115,8 @@ desktop_focus_and_activate_view(struct seat *seat, struct view *view) view_minimize(view, false); return; } - if (!view->mapped) { + + if (!view->mapped || !view->surface) { return; } -- 2.52.0