Clarify on sub-surface
This state includes the sub-surface position relative to the parent surface (wl_subsurface.set_position), and the stacking order of the parent and its sub-surfaces (wl_subsurface.place_above and .place_below).
I read this as each surface has its own stack, which consists of itself and its immediate child sub-surfaces, is that correct? I find this ambiguous because the wording "parent and its sub-surfaces" can also mean "parent and all of its descendant", i.e. including grand-children, etc.
Also as a corollary,
.place_below moves the surface and its stack as a whole, is that right? Because otherwise the stacks can interleave which would break the assumption above.
A / \ B C | D
initial stacking top to bottom: C, BD, A.
Call .place_above(C) on B, is the resulting stack:
- BD, C, A; or
- B, C, D, A?