Weston shows subsurfaces of unmapped subsurfaces if buffer scale is set
This came up while debugging issues around the OBS Wayland port:
The spec states:
A sub-surface becomes mapped, when a non-NULL wl_buffer is applied and the parent surface is mapped. The order of which one happens first is irrelevant. A sub-surface is hidden if the parent becomes hidden, or if a NULL wl_buffer is applied. These rules apply recursively through the tree of surfaces.
Weston basically follows the spec there, however it is possible to map a subsurface
subB of a subsurface
wl_surface_set_buffer_scale is called on
subA, even if
subA never got a buffer attached.
While this should be easy to fix, apparently the QT Wayland backend makes heavy use of bufferless "intermediate" subsurfaces - likely because it currently appears to work on all major compositors. I tested Mutter and Sway and assume KWin behaves similar. So fixing this should probably involve some coordination with the QT team and distributors (at least Fedora, which enables the QT Wayland backend by default).
- provide a cleaned up example client