Stacking subsurface siblings

Arnaud Vrac rawoul at gmail.com
Tue Jun 16 08:50:51 PDT 2015


On Tue, Jun 16, 2015 at 5:47 PM, Jonas Ã…dahl <jadahl at gmail.com> wrote:

> On Tue, Jun 16, 2015 at 04:46:55PM +0200, Arnaud Vrac wrote:
> > Hi,
> >
> > I'm wondering if a behaviour of weston related to subsurfaces is either a
> > bug or intended. The protocol description is not clear on what happens in
> > the following cases:
> >
> > Suppose I have a shell surface (BLUE) and two subsurfaces (RED, GREEN). I
> > want to stack them to I get RED, GREEN, BLUE from bottom to top.
> >
> > If I do:
> >
> > wl_subsurface_place_below(GREEN->subsurface, BLUE->surface);
> > wl_subsurface_place_below(RED->subsurface, GREEN->surface);
> >
> > It works, but if I do:
> >
> > wl_subsurface_place_below(RED->subsurface, GREEN->surface);
> > wl_subsurface_place_below(GREEN->subsurface, BLUE->surface);
> >
> > The order is GREEN, RED, BLUE instead.
> >
> > Logically the sibling relative order should be kept in the second case,
> but
> > it's not. The protocol is not clear on what should happen, what is the
> > expected result ?
>
> The protocol says "This sub-surface is taken from the stack, and put
> back just above the reference surface, changing the z-order of the
> sub-surfaces." Considering this, if you first placed a surface below
> another, placing again, that relationship may have been broken by the
> new operation. In other words, the "tree" is not moved, just the
> subsurface you placed.
>

Alright, thanks for the clarification. The current implementation makes
sense then.

-- 
Arnaud Vrac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150616/d1be5018/attachment.html>


More information about the wayland-devel mailing list