<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 3, 2016 at 11:36 AM, Jasper St. Pierre <span dir="ltr"><<a href="mailto:jstpierre@mecheye.net" target="_blank">jstpierre@mecheye.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">set_parent was moved to xdg_toplevel. Perhaps that's a good idea,<br>
perhaps it's not. This does mean that a tooltip's parent can never<br>
change, and a popup's parent can never change. That can help for<br>
getting grab semantics right, though it might be an idea if we say<br>
that set_parent on a popup / tooltip simply emit error if a parent is<br>
already set. I'm -1 to that, though.<br></blockquote><div><br></div><div>xdg_toplevel *must* support the ability to change the parent. It is impossible to get correct floating windows unless the parent can be set to a surface that may not exist at the moment the floating surface is first created (imagine a surface that must float above all opened documents, and the user can create/destroy documents at will without closing the floating surface).</div><div><br></div><div>Less importantly, setting the parent will avoid the need for a complex directed acyclic graph api with multiple parents per surface, and avoid more api to determine whether a parent's mapping controls the mapping of the child. The client can keep track of which parent is the highest and only tell the compositor about that, changing as necessary before any request that will change the stacking order.</div><div><br></div><div>I think it is ok if some roles, like tooltip, do not allow the parent to be changed. But the basic class must.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Some think that wl_surface.attach's coordinates are confusing and<br>
built poorly, and I am inclined to agree, however, when I wrote the<br>
original get_xdg_popup, I simply forgot about them. It might be that<br>
we do positioning on first-attach, and we say that the tooltip is<br>
defined to be 0,0 relative to the surface. That is an idea, though I'm<br>
+0 on it.<br></blockquote><div><br></div><div>The toolkits will hide this. I would agree that defining the delta to be from 0,0 for the initial attach, in cases where the position is usable on first attach, is a good idea.</div><div> </div></div></div></div>