<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 16, 2015 at 5:47 PM, Jonas Ã…dahl <span dir="ltr"><<a href="mailto:jadahl@gmail.com" target="_blank">jadahl@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Jun 16, 2015 at 04:46:55PM +0200, Arnaud Vrac wrote:<br>
> Hi,<br>
><br>
> I'm wondering if a behaviour of weston related to subsurfaces is either a<br>
> bug or intended. The protocol description is not clear on what happens in<br>
> the following cases:<br>
><br>
> Suppose I have a shell surface (BLUE) and two subsurfaces (RED, GREEN). I<br>
> want to stack them to I get RED, GREEN, BLUE from bottom to top.<br>
><br>
> If I do:<br>
><br>
> wl_subsurface_place_below(GREEN->subsurface, BLUE->surface);<br>
> wl_subsurface_place_below(RED->subsurface, GREEN->surface);<br>
><br>
> It works, but if I do:<br>
><br>
> wl_subsurface_place_below(RED->subsurface, GREEN->surface);<br>
> wl_subsurface_place_below(GREEN->subsurface, BLUE->surface);<br>
><br>
> The order is GREEN, RED, BLUE instead.<br>
><br>
> Logically the sibling relative order should be kept in the second case, but<br>
> it's not. The protocol is not clear on what should happen, what is the<br>
> expected result ?<br>
<br>
</div></div>The protocol says "This sub-surface is taken from the stack, and put<br>
back just above the reference surface, changing the z-order of the<br>
sub-surfaces." Considering this, if you first placed a surface below<br>
another, placing again, that relationship may have been broken by the<br>
new operation. In other words, the "tree" is not moved, just the<br>
subsurface you placed.<br></blockquote><div><br></div><div>Alright, thanks for the clarification. The current implementation makes sense then.</div><div><br></div></div>-- <br><div class="gmail_signature">Arnaud Vrac</div>
</div></div>