On Wed, Jun 17, 2015 at 9:35 AM, Bill Spitzak <spit...@gmail.com> 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.
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to