summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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))