diff --git a/dwl.c b/dwl.c index 6303c25..b4b3cea 100644 --- a/dwl.c +++ b/dwl.c @@ -150,6 +150,7 @@ typedef struct { struct wlr_box geo; enum zwlr_layer_shell_v1_layer layer; + bool mapped; } LayerSurface; typedef struct { @@ -755,6 +756,12 @@ commitlayersurfacenotify(struct wl_listener *listener, void *data) struct wlr_output *wlr_output = wlr_layer_surface->output; Monitor *m; + if (wlr_layer_surface->current.committed == 0 && + layersurface->mapped == wlr_layer_surface->mapped) + return; + + layersurface->mapped = wlr_layer_surface->mapped; + if (!wlr_output) return;