<div dir="ltr">On Wed, Jun 17, 2015 at 9:35 AM, Bill Spitzak <span dir="ltr"><<a href="mailto:spitzak@gmail.com" target="_blank">spitzak@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>The problem is that the way it works is *not* a tree, but some kind of list.<br><br></div>As described the following code:<span class=""><br><br><div>wl_subsurface_place_below(RED->subsurface, GREEN->surface);<br></div><div>wl_subsurface_place_below(GREEN->subsurface, BLUE->surface);<br></div><div><br></div></span><div>Produces the order GREEN, RED, BLUE instead.<br></div></div></blockquote><div><br></div><div>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.<br><br></div><div>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.<br><br></div><div>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.<br><br></div></div></div></div>