Re: [PATCH spice-gtk] RFC: win32: do not handle win keys when the keyboard is not grabbed

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

 



ACK.

On 04/02/2013 06:15 PM, Marc-André Lureau wrote:
Special-case on win32, filter out the win keys when not having the
keyboard grab. This is to avoid the win keys to be received both by
the guest and the client, which can be undesirable in general.

https://bugzilla.redhat.com/show_bug.cgi?id=873341
---
  gtk/spice-widget.c | 8 ++++++++
  1 file changed, 8 insertions(+)

diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index 324f5ee..233b49f 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -1278,6 +1278,14 @@ static gboolean key_event(GtkWidget *widget, GdkEventKey *key)
      /* on windows, we ought to ignore the reserved key event? */
      if (key->hardware_keycode == 0xff)
          return false;
+
+    if (!d->keyboard_grab_active) {
+        if (key->hardware_keycode == VK_LWIN ||
+            key->hardware_keycode == VK_RWIN ||
+            key->hardware_keycode == VK_APPS)
+            return false;
+    }
+
  #endif
      SPICE_DEBUG("%s %s: keycode: %d  state: %d  group %d modifier %d",
              __FUNCTION__, key->type == GDK_KEY_PRESS ? "press" : "release",

_______________________________________________
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]