[PATCH wayland-protocols v2] xdg-shell: Introduce xdg_tooltip

Bill Spitzak spitzak at gmail.com
Wed Feb 3 21:00:35 UTC 2016

On Wed, Feb 3, 2016 at 11:36 AM, Jasper St. Pierre <jstpierre at mecheye.net>

> set_parent was moved to xdg_toplevel. Perhaps that's a good idea,
> perhaps it's not. This does mean that a tooltip's parent can never
> change, and a popup's parent can never change. That can help for
> getting grab semantics right, though it might be an idea if we say
> that set_parent on a popup / tooltip simply emit error if a parent is
> already set. I'm -1 to that, though.

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

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.

I think it is ok if some roles, like tooltip, do not allow the parent to be
changed. But the basic class must.

> Some think that wl_surface.attach's coordinates are confusing and
> built poorly, and I am inclined to agree, however, when I wrote the
> original get_xdg_popup, I simply forgot about them. It might be that
> we do positioning on first-attach, and we say that the tooltip is
> defined to be 0,0 relative to the surface. That is an idea, though I'm
> +0 on it.

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20160203/b37419eb/attachment.html>

More information about the wayland-devel mailing list