Stacking subsurface siblings

Jonas Ã…dahl jadahl at gmail.com
Tue Jun 16 08:42:43 PDT 2015


On Tue, Jun 16, 2015 at 08:02:52AM -0700, Jasper St. Pierre wrote:
> I was not aware you could stack subsurfaces under a parent surface at
> all. Is this intended protocol behavior? The fact that you might be
> able to do that at all in Weston might be a bug.

>From wl_subsurface.place_above:
"... The reference surface must be one of the sibling surfaces, or the
parent surface."

place_below is semantically equivalent except the stacking order. To me
this reads as it is explicitly allowed to stack a subsurface below a
parent surface.

Now how that should work if the parent surface stacks itself above some
other surface is undefined I assume (whether the subsurface that is
stacked below its parent surface should be below or above the surface
the parent surface is stacked above, but I assume it subsurface tree
should be considered tightly coupled and be stacked together, if we'd
want to define that behaviour.


Jonas

> 
> On Tue, Jun 16, 2015 at 7:46 AM, Arnaud Vrac <rawoul at gmail.com> 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 ?
> >
> > I have attached a small sample to test easily.
> >
> > --
> > Arnaud
> >
> > _______________________________________________
> > wayland-devel mailing list
> > wayland-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> >
> 
> 
> 
> -- 
>   Jasper
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list