Stacking subsurface siblings

Bill Spitzak spitzak at
Wed Jun 17 09:51:04 PDT 2015

On Wed, Jun 17, 2015 at 9:35 AM, Bill Spitzak <spitzak at> wrote:

> The problem is that the way it works is *not* a tree, but some kind of
> list.
> As described the following code:
> wl_subsurface_place_below(RED->subsurface, GREEN->surface);
> wl_subsurface_place_below(GREEN->subsurface, BLUE->surface);
> Produces the order GREEN, RED, BLUE instead.

Want to apologize for the top-posting. That is because I am forced to use
the gmail web api now, which seems to encourage it. I think this email is
correctly formatted, with the quoted text at the top and with irrelevant
parts edited out.

In response to another email, the reason the result is the order given is
that place_below(A,B) is implemented as "put A at the start of the list".
The first statement produces the list R,G. The second statement then first
adds B to the list, producing either R,G,B or R,B,G or B,R,G. Then it moves
G to the start of the list, producing G,R,B or G,B,R.

If place_below(A,B) was implemented as "put A before B in the list" then
the second statement would produce R,G,B or G,B,R. Although it is possible
to produce the expected result, this still allows an unexpected order.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the wayland-devel mailing list