[Spice-devel] [PATCH spice-gtk] RFC: release pointer grab on grab-broken

Hans de Goede hdegoede at redhat.com
Wed Mar 27 07:57:55 PDT 2013


Hi,

On 03/27/2013 03:51 PM, Marc-André Lureau wrote:
>
>
> ----- Mensaje original -----
>> Hi,
>>
>> On 03/27/2013 01:57 PM, Marc-André Lureau wrote:
>>> On Wed, Mar 27, 2013 at 1:52 PM, Hans de Goede
>>> <hdegoede at redhat.com> wrote:
>>>> Really a function named try_keyboard_ungrab, should not touch the
>>>> mouse_grab, it is as simple as that.
>>>
>>> This argument doesn't hold. If you prefer I rename it to
>>> "ungrab_keyboard_and_pointer" for example.
>>>
>>> Having only a pointer grab is a non-desirable behaviour, as shown
>>> by
>>> the above related bugs. Can you explain in which case it's
>>> desirable?
>>
>> I already gave you an example, when the keyboard-grab property of the
>> widget is false we already only hold the pointer grab (when in server
>> mouse mode). But for some reason you conveniently snipped that part
>> of my mail instead of replying to it.
>
> You are not giving a use case.
>
> We are talking about ungrabing both pointer when ungrabing the keyboard. It keyboard grab was already disabled, that condition won't happen.

If the keyboard-grab property gets set to false while both to
keyboard and the mouse are grabbed then your proposed change will
wrongly also ungrab the mouse.

Now you can argue that will not happen, but spice-gtk is a widget /
a library and we don't know what apps using it will do.

Regards,

Hans


More information about the Spice-devel mailing list