[PATCH spice-gtk] widget: release keys on grab-broken by external applications

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-- 
1.8.3.rc1.49.g8d97506

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]