Compositor grabs (was: Re: [PATCH] protocol: Add DnD actions)

Michal Suchanek hramrach at gmail.com
Sat Apr 18 06:06:58 PDT 2015


On 17 April 2015 at 23:40, Bill Spitzak <spitzak at gmail.com> wrote:
> On 04/17/2015 05:16 AM, Carlos Garnacho wrote:
>
>> Let's expand on that example, maybe far-streched, but certainly possible:
>> - I'm manipulating a client window with 2 fingers on the touchscreen
>> (say zooming an image)
>> - Any other interaction on the client makes it pop up an xdg_popup
>> (say a third touch, a key combo, or the pointer)
>> - Q: what happens with the two first touches?
>
>
> The touches held down should continue to go to the surface they were going
> to before, while the events related to the event that triggered the grab
> will go to the grab client.
>
> When the two touches are fully released then the next press of them will go
> to the grab client.

Yes, I think from user point of view this is the only option that makes sense.

Making gesture result dependent on exact touch and release event order
will lead to very inconsistent behaviour depending on minor timing
changes in performing the touches.

>
> Wayland could guarantee that the release and drag events go to the same
> client that got the press event. Grabs just dictate where new press events
> go.
>
> I don't think this situation will happen much, due to server-induced grabs
> which are fully synchronous, so you cannot press two buttons in two
> different widgets and get two grabs. Instead one of them will get the grab
> and that one will see the other button.

Actually I think this should be possible.

Consider a hypothetical photo organizing application which has photo
preview in one widget and thumbnail organizer in another widget.

As a user of such app you should be able to zoom and rotate the
preview and drag around the thumbnails around and to different windows
(eg file manager) at the same time. If starting a drag in the
thumbnail management widget (accidentally or intentionally) cancels
the zoom gesture in the preview you are going to have a hell of a time
trying to explain to a user WTF is going on.

Thanks

Michal


More information about the wayland-devel mailing list