summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-09-10 18:41:39 -0500
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-09-10 18:54:35 -0500
commit1bb9c4583a4e5b0975ed9b57e994f1d958f04c73 (patch)
tree34965be72b9fd77be8299a79ab4454bb56204604
parent9bcef3d040790b5f3064e33e149891120055a377 (diff)
fix exclusive zone of unmapped layer surfaces
Fixes: https://github.com/djpohly/dwl/issues/302
-rw-r--r--dwl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dwl.c b/dwl.c
index 912a877..7c3855d 100644
--- a/dwl.c
+++ b/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))