]> git.mdlowis.com Git - proto/labwc.git/commitdiff
cursor: do not crash on layer popup/subsurfaces
authorJohan Malm <jgm323@gmail.com>
Thu, 21 Oct 2021 19:37:30 +0000 (20:37 +0100)
committerJohan Malm <jgm323@gmail.com>
Thu, 21 Oct 2021 19:37:30 +0000 (20:37 +0100)
src/cursor.c

index c9d89cd21e2b8b2ed5b427661c0fad4741198360..653c5227acd5c6f5ff81771fa217f31c4d874317 100644 (file)
@@ -480,8 +480,9 @@ cursor_button(struct wl_listener *listener, void *data)
 
        /* Handle _press_ on a layer surface */
        if (!view && surface) {
-               /* ...if we've ended up here it must be a layer surface */
-               assert(wlr_surface_is_layer_surface(surface));
+               if (!wlr_surface_is_layer_surface(surface)) {
+                       return;
+               }
                struct wlr_layer_surface_v1 *layer =
                        wlr_layer_surface_v1_from_wlr_surface(surface);
                if (layer->current.keyboard_interactive) {