qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v6 3/4] ui: add fix for GTK Pause key handling on Wi


From: Daniel P. Berrange
Subject: [Qemu-devel] [PATCH v6 3/4] ui: add fix for GTK Pause key handling on Win32
Date: Tue, 12 Dec 2017 14:04:58 +0000

Versions of GTK prior to 3.22 did not correctly set the keyval
field when VK_PAUSE was received on Windows.

Signed-off-by: Daniel P. Berrange <address@hidden>
---
 ui/gtk.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ui/gtk.c b/ui/gtk.c
index 749999df44..89cc81b708 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1207,6 +1207,12 @@ static gboolean gd_key_event(GtkWidget *widget, 
GdkEventKey *key, void *opaque)
     }
 
     if (key->keyval == GDK_KEY_Pause) {
+#ifdef G_OS_WIN32
+        /* for some reason GDK does not fill keyval for VK_PAUSE
+         * See https://bugzilla.gnome.org/show_bug.cgi?id=769214
+         */
+        || key->hardware_keycode == VK_PAUSE
+#endif
         qemu_input_event_send_key_qcode(vc->gfx.dcl.con, Q_KEY_CODE_PAUSE,
                                         key->type == GDK_KEY_PRESS);
         return TRUE;
-- 
2.14.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]