<div dir="ltr">Hey,<br><br>This came up during the mutter implementation. See my questions here for what prompted this. I found the proposed phrasing a bit confusing as well...<br><br><a href="https://bugzilla.gnome.org/show_bug.cgi?id=705502#c16">https://bugzilla.gnome.org/show_bug.cgi?id=705502#c16</a></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 17, 2014 at 6:37 AM, Jonas Ådahl <span dir="ltr"><<a href="mailto:jadahl@gmail.com" target="_blank">jadahl@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Fri, Jan 17, 2014 at 12:20:17PM +0200, Pekka Paalanen wrote:<br>
> Hi Jonas<br>
><br>
> On Thu, 16 Jan 2014 23:27:07 +0100<br>
> Jonas Ådahl <<a href="mailto:jadahl@gmail.com">jadahl@gmail.com</a>> wrote:<br>
><br>
> > Clarify some semantics of wl_subsurface.place_below and<br>
> > wl_subsurface.place_below that were not specified.<br>
><br>
> Below and below. ;-)<br>
><br>
> ><br>
> > Signed-off-by: Jonas Ådahl <<a href="mailto:jadahl@gmail.com">jadahl@gmail.com</a>><br>
> > ---<br>
> ><br>
> > Hi,<br>
> ><br>
> > Implementing support for sub-surfaces in mutter we ran in to some<br>
> > unspecified behaviour in the subsurface placement protocol.<br>
> ><br>
> > I have documented what I understand is how the implementation in weston<br>
> > works (please correct me if I'm wrong). Is this the intended semantics?<br>
> ><br>
> > Jonas<br>
> ><br>
> > protocol/wayland.xml | 6 ++++++<br>
> > 1 file changed, 6 insertions(+)<br>
> ><br>
> > diff --git a/protocol/wayland.xml b/protocol/wayland.xml<br>
> > index 61fde84..619567c 100644<br>
> > --- a/protocol/wayland.xml<br>
> > +++ b/protocol/wayland.xml<br>
> > @@ -1952,6 +1952,12 @@<br>
> ><br>
> > A new sub-surface is initially added as the top-most in the stack<br>
> > of its siblings and parent.<br>
> > +<br>
> > + Between two sub-surface parent commits, the stacking of surfaces in a<br>
> > + sub-surface tree are executed as operations in the same order as the<br>
> > + requests were made. A placement request may alter two surfaces relative<br>
> > + placement by placing itself in-between. A subsequent placement request<br>
> > + to a sub-surface replaces any previous requests.<br>
> > </description><br>
> ><br>
> > <arg name="sibling" type="object" interface="wl_surface"<br>
><br>
> Hmm, I guess, but I am not sure I understand this description at all.<br>
><br>
> The intention, and how the code works, is that each change is executed<br>
> in the order the place_above/below requests are sent, and each request<br>
> operates on the outcome of the previous. Whether there is a parent<br>
> commit in between or not makes no difference.<br>
><br>
> The code has two lists: the effective ordering, and the pending<br>
> ordering. These requests directly affect the pending ordering as they<br>
> are received. When the parent surface is committed, the pending<br>
> ordering overwrites the effective ordering, making them equal. The<br>
> effective ordering is what is composited on screen.<br>
><br>
> In essence, you can think of the place_above/below operating<br>
> immediately, and parent commits just publish the whole ordering.<br>
><br>
> Does this help? Can you rephrase the protocol documentation?<br>
<br>
</div></div>This is how I understood it, but I'll try to rephrase it some,<br>
given your explanation, and send a v2.<br>
<div class="im"><br>
><br>
> What was the unspecified behaviour here? I'm not sure how else you<br>
> could understand place_above/below, but then again I'm the original<br>
> author so it's far too obvious to me. :-)<br>
<br>
</div>For example one could queue the operations until commit, having a<br>
subsequent request replace a previous one, instead of executing<br>
them immediately relying on commit to take a snapshot.<br>
<br>
It could also be read as a subsequent request that now replaces a<br>
previous request to be invalid. This should also be clarified in<br>
set_position so I'll send a patch for that too.<br>
<br>
Thanks for the review!<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Jonas<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br> Jasper<br>
</div>