[PATCH wayland-protocols v2 6/7] xdg-shell: Make xdg_popup non-grabbing by default

Bill Spitzak spitzak at gmail.com
Wed May 11 19:21:08 UTC 2016


On Tue, May 10, 2016 at 10:50 PM, Jonas Ã…dahl <jadahl at gmail.com> wrote:

> Turn xdg_popup into plain temporary child surfaces without any grabbing
> or mapping order requirements by default.
>
> In order to create grabbing popup chains, a new request 'grab' is
> introduced which enables more or less the same semantics and
> requirements as xdg_popup previously had related to grabbing, stacking
> and mapping order.
>
> This enables using xdg_popup for creating tooltips and other user
> interface elements that does not want to take an explicit grab.
>

YAY!!!!

However clients need the ability to "grab" from any surface. Otherwise they
cannot use their own graphics to create popup menus (they can make a dummy
invisible popup window, but that seems like a kludge), or make an interface
that uses multiple popup windows but can be in a state where there are zero
of them displayed. Also necessary if you want to emulate X grabs since they
can be done from any surface. Basically the grab request should be moved to
xdg_surface.

Dismissing a grab should not unmap the popup surfaces (except perhaps if
the client is failing to respond to pings, but in that case I would have a
click anywhere remove the popups whether or not a grab was done). This is a
requirement so the client can synchronize other graphics with the removal
of the popups. It sounds like this is true right now, but the description
of grab contains a lot of text that implies some relationship that should
maybe be deleted.

The idea of sending a copy of every event to every client surface is pretty
ugly. You need at least a 'frame' event so the client can tell which blocks
belong together. Instead the events can go to the surface that did the
grab. The compositor should send events to the client telling the actual
position of any child surface relative to it's parent, this allows a client
to translate an event in any child surface to any other one.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160511/00e496d4/attachment.html>


More information about the wayland-devel mailing list