[virt-tools-list] [PATCH] hotkeys: send modifiers before non-modifier key

Marc-André Lureau marcandre.lureau at gmail.com
Thu Sep 26 14:33:12 UTC 2013


This fix the "send menu" for hotkeys set with non-modifiers keys. The
current order of press events is wrong, as it sends first non-modifiers
keys, and in general Ctrl+t will work, T+Ctrl will not.

https://bugzilla.redhat.com/show_bug.cgi?id=846006
---
 src/virt-viewer-window.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index 7593e3c..b70aaf8 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -632,9 +632,6 @@ accel_key_to_keys(const GtkAccelKey *key)
     guint val;
     GArray *a = g_array_new(FALSE, FALSE, sizeof(guint));
 
-    val = key->accel_key;
-    g_array_append_val(a, val);
-
     g_warn_if_fail((key->accel_mods &
                     ~(GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK)) == 0);
 
@@ -653,6 +650,9 @@ accel_key_to_keys(const GtkAccelKey *key)
         g_array_append_val(a, val);
     }
 
+    val = key->accel_key;
+    g_array_append_val(a, val);
+
     val = GDK_VoidSymbol;
     g_array_append_val(a, val);
 
-- 
1.8.3.1




More information about the virt-tools-list mailing list