From 93863b132eb7a32e296d5f224181b04e161b1c58 Mon Sep 17 00:00:00 2001 From: tiosgz Date: Fri, 26 Jul 2024 07:53:42 +0000 Subject: [PATCH] Output: don't configure uninitialized layer surfaces It is possible for a layer surface to notably delay its initial commit; for example shotman[1] creates two layer surfaces and uses one of them to get enough information for a screenshot and initializing the other. River could also have sent a configure before initial commit if two clients raced against each other. Fixes https://codeberg.org/river/river/issues/1123 [1]:https://sr.ht/~whynothugo/shotman/ --- river/Output.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/river/Output.zig b/river/Output.zig index e449f3f..77f0eb8 100644 --- a/river/Output.zig +++ b/river/Output.zig @@ -367,6 +367,8 @@ fn sendLayerConfigures( if (@as(?*SceneNodeData, @ptrFromInt(node.data))) |node_data| { const layer_surface = node_data.data.layer_surface; + if (!layer_surface.wlr_layer_surface.initialized) continue; + const exclusive = layer_surface.wlr_layer_surface.current.exclusive_zone > 0; if (exclusive != (mode == .exclusive)) { continue;