Skip to content

wayland/subsurface: Ensure cached state recursivly gets applied on set_desync()

Robert Mader requested to merge rmader/mutter:subsurface-desync-fixes into main

From the main commit:

Subsurfaces can be effectively synced indirectly via their ancestors.
Right now such indirectly synced surfaces don't apply their cached
state when their ancestor effectively becomes desync as by the time
we call `parent_state_applied()` on them, they are considered as
desync.

Thus sligthly reoder things so when the ancestors becomes desync
and applies its state, those surfaces still count as synced and
will thus apply their cached state as well.

While on it, add a check to prevent `set_desync()` to have side
effects when the target surface is not currently synced.

This fixes an issue I have with an in-development client. Other compositors such as Weston already do this correctly.

Edited by Robert Mader

Merge request reports