[Spice-devel] [PATCH spice-gtk] widget: release keys on grab-broken by external applications
Marc-André Lureau
marcandre.lureau at gmail.com
Wed May 15 11:02:04 PDT 2013
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
More information about the Spice-devel
mailing list