]> git.mdlowis.com Git - proto/labwc.git/commitdiff
desktop: Fix activating unmapped views
authorJoshua Ashton <joshua@froggi.es>
Fri, 31 Dec 2021 02:58:34 +0000 (02:58 +0000)
committerJohan Malm <johanmalm@users.noreply.github.com>
Fri, 31 Dec 2021 07:36:25 +0000 (07:36 +0000)
This can happen sometimes in xwayland, need to guard against this.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
src/desktop.c

index 0e68387934067e1e4cfbf2c6c43cf1ed6e2e1f26..ba562c29f2407b8fc65074e6f4a8509c8b2a1ec6 100644 (file)
@@ -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;
        }