From: Joshua Ashton Date: Fri, 31 Dec 2021 02:58:34 +0000 (+0000) Subject: desktop: Fix activating unmapped views X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=295d5172;p=proto%2Flabwc.git desktop: Fix activating unmapped views This can happen sometimes in xwayland, need to guard against this. Signed-off-by: Joshua Ashton --- 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; }