fix exclusive zone of unmapped layer surfaces
Fixes: https://github.com/djpohly/dwl/issues/302
This commit is contained in:
parent
9bcef3d040
commit
1bb9c4583a
1 changed files with 4 additions and 2 deletions
6
dwl.c
6
dwl.c
|
@ -522,7 +522,8 @@ arrangelayer(Monitor *m, struct wl_list *list, struct wlr_box *usable_area, int
|
|||
const uint32_t both_vert = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP
|
||||
| ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM;
|
||||
|
||||
if (wlr_layer_surface->mapped && exclusive != (state->exclusive_zone > 0))
|
||||
if (!((LayerSurface *)wlr_layer_surface->data)->mapped
|
||||
|| exclusive != (state->exclusive_zone > 0))
|
||||
continue;
|
||||
|
||||
bounds = state->exclusive_zone == -1 ? full_area : *usable_area;
|
||||
|
@ -901,6 +902,7 @@ createlayersurface(struct wl_listener *listener, void *data)
|
|||
*/
|
||||
old_state = wlr_layer_surface->current;
|
||||
wlr_layer_surface->current = wlr_layer_surface->pending;
|
||||
layersurface->mapped = 1;
|
||||
arrangelayers(layersurface->mon);
|
||||
wlr_layer_surface->current = old_state;
|
||||
}
|
||||
|
@ -2312,7 +2314,7 @@ unmaplayersurfacenotify(struct wl_listener *listener, void *data)
|
|||
{
|
||||
LayerSurface *layersurface = wl_container_of(listener, layersurface, unmap);
|
||||
|
||||
layersurface->layer_surface->mapped = (layersurface->mapped = 0);
|
||||
layersurface->mapped = 0;
|
||||
wlr_scene_node_set_enabled(layersurface->scene, 0);
|
||||
if (layersurface->layer_surface->output
|
||||
&& (layersurface->mon = layersurface->layer_surface->output->data))
|
||||
|
|
Loading…
Reference in a new issue