wlroots check map state of layersurfaces this for us

This commit is contained in:
Leonardo Hernández Hernández 2022-10-01 23:33:17 -05:00
parent ae3d435717
commit 434ed119f3
No known key found for this signature in database
GPG Key ID: E538897EE11B9624

4
dwl.c
View File

@ -456,9 +456,7 @@ arrangelayer(Monitor *m, struct wl_list *list, struct wlr_box *usable_area, int
struct wlr_layer_surface_v1 *wlr_layer_surface = layersurface->layer_surface; struct wlr_layer_surface_v1 *wlr_layer_surface = layersurface->layer_surface;
struct wlr_layer_surface_v1_state *state = &wlr_layer_surface->current; struct wlr_layer_surface_v1_state *state = &wlr_layer_surface->current;
/* Unmapped surfaces shouldn't have exclusive zone */ if (exclusive != (state->exclusive_zone > 0))
if (!((LayerSurface *)wlr_layer_surface->data)->mapped
|| exclusive != (state->exclusive_zone > 0))
continue; continue;
wlr_scene_layer_surface_v1_configure(layersurface->scene_layer, &full_area, usable_area); wlr_scene_layer_surface_v1_configure(layersurface->scene_layer, &full_area, usable_area);