diff options
author | Daniel P. Berrange | 2018-01-17 17:47:16 +0100 |
---|---|---|
committer | Gerd Hoffmann | 2018-01-25 15:02:00 +0100 |
commit | 8026a81aa41a7fa1f70ddd9f060b6c683377704f (patch) | |
tree | 6b768b9ccab202e4c8aebd15a6c8532fad3afc48 | |
parent | ui: convert GTK and SDL1 frontends to keycodemapdb (diff) | |
download | qemu-8026a81aa41a7fa1f70ddd9f060b6c683377704f.tar.gz qemu-8026a81aa41a7fa1f70ddd9f060b6c683377704f.tar.xz qemu-8026a81aa41a7fa1f70ddd9f060b6c683377704f.zip |
ui: add fix for GTK Pause key handling on Win32
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 <berrange@redhat.com>
Message-id: 20180117164717.15855-4-berrange@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | ui/gtk.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1206,7 +1206,14 @@ static gboolean gd_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque) return TRUE; } - if (key->keyval == GDK_KEY_Pause) { + 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; |