[Spice-devel] [PATCH spice-gtk] widget: release keys on grab-broken by external applications
Hans de Goede
hdegoede at redhat.com
Wed May 15 11:28:08 PDT 2013
Hi,
Looks good, ACK. About the FIXME, no we should not always
release the keys on ungrab, since an ungrab != focus loss in
some cases, ie it can be done by the client through the
PROP_KEYBOARD_GRAB property.
Regards,
Hans
On 05/15/2013 08:02 PM, Marc-André Lureau wrote:
> Fixes l key repeatition when pressing Alt+L on Windows when the
> pointer is over the display.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=917986
> ---
> gtk/spice-widget.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
> index de1cead..2e513a8 100644
> --- a/gtk/spice-widget.c
> +++ b/gtk/spice-widget.c
> @@ -476,6 +476,13 @@ static gboolean grab_broken(SpiceDisplay *self, GdkEventGrabBroken *event,
>
> if (event->keyboard) {
> try_keyboard_ungrab(self);
> + /* This is matching the WM_KILLFOCUS event received when
> + * locking the session with Win+L for example. Note that if
> + * the pointer is not over the application, it receives a
> + * focus-out instead (which also releases keys).
> + * FIXME: always release keys when ungrab keyboard? */
> + if (!event->implicit && event->grab_window == NULL)
> + release_keys(self);
> }
>
> /* always release mouse when grab broken, this could be more
>
More information about the Spice-devel
mailing list