git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit0488249bffde1978bb30b7ff79e4725a66387788
parentba6de59a93
authorIsaac Freund <[email protected]>
date2025-12-20 18:33
LayerSurface: don't configure in response to unmap

We should wait until the next "initial commit" before
sending a configure after a layer surface unmaps itself.

 river/LayerShellOutput.zig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/river/LayerShellOutput.zig b/river/LayerShellOutput.zig
index 595602c..63b68f2 100644
--- a/river/LayerShellOutput.zig
+++ b/river/LayerShellOutput.zig
@@ -124,7 +124,9 @@ fn sendConfigures(
             assert(node.type == .tree);
             const node_data: *SceneNodeData = @ptrCast(@alignCast(node.data orelse continue));
             const layer_surface = node_data.data.layer_surface;
-            if (!layer_surface.wlr_layer_surface.initialized) {
+            if (!layer_surface.wlr_layer_surface.surface.mapped and
+                !layer_surface.wlr_layer_surface.initial_commit)
+            {
                 continue;
             }
             if (layer_surface.wlr_layer_surface.output != output.wlr_output) {