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/
(cherry picked from commit 93863b132e
)
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user