cursor: do not crash on layer popup/subsurfaces

This commit is contained in:
Johan Malm 2021-10-21 20:37:30 +01:00
parent 95ce9e0264
commit b1beab473c

View file

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