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/
This commit is contained in:
parent
85a1673a9e
commit
93863b132e
@ -367,6 +367,8 @@ fn sendLayerConfigures(
|
|||||||
if (@as(?*SceneNodeData, @ptrFromInt(node.data))) |node_data| {
|
if (@as(?*SceneNodeData, @ptrFromInt(node.data))) |node_data| {
|
||||||
const layer_surface = node_data.data.layer_surface;
|
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;
|
const exclusive = layer_surface.wlr_layer_surface.current.exclusive_zone > 0;
|
||||||
if (exclusive != (mode == .exclusive)) {
|
if (exclusive != (mode == .exclusive)) {
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user