From b5781c396e2daf166ed504237c250043f497c573 Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Thu, 10 Dec 2015 16:54:44 +0000 Subject: [PATCH] widget: Ignore all key events after kbd ungrab For one thing this completely breaks regrabbing the keyboard after first ungrab but this is only for demonstrating what I expect to happen to all key events (except for keboard grab keys of course) after I ungrab the keyboard. https://bugs.freedesktop.org/show_bug.cgi?id=93249 --- src/spice-widget.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/spice-widget.c b/src/spice-widget.c index 503f82a..acd7c94 100644 --- a/src/spice-widget.c +++ b/src/spice-widget.c @@ -1340,6 +1340,10 @@ static gboolean key_event(GtkWidget *widget, GdkEventKey *key) SpiceDisplayPrivate *d = display->priv; int scancode; + if (!d->keyboard_grab_active) { + return false; + } + #ifdef G_OS_WIN32 /* on windows, we ought to ignore the reserved key event? */ if (key->hardware_keycode == 0xff) -- 2.5.0