Really fix Bug 601926 - Don't hardcode meta to alt
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 24 Aug 2010 20:53:17 +0000 (16:53 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 24 Aug 2010 20:54:38 +0000 (16:54 -0400)
Correct fix applied this time.  Tested, Alt is not broken by this
change.

configure.in
src/keymap.h
src/vte.c

index d3b8bf9..8bc3b57 100644 (file)
@@ -51,7 +51,7 @@ case "$with_gtk" in
        VTE_PC_VERSION=
        VTE_LIBRARY_SUFFIX=
        GTK_API_VERSION=2.0
-       GTK_REQUIRED=2.14.0
+       GTK_REQUIRED=2.20.0
        ;;
   3.0) VTE_API_VERSION=2.90
        VTE_API_MAJOR_VERSION=2
index 3a4cefe..243e22e 100644 (file)
@@ -27,7 +27,7 @@
 
 G_BEGIN_DECLS
 
-#define VTE_META_MASK          GDK_MOD1_MASK
+#define VTE_META_MASK          GDK_META_MASK
 #define VTE_NUMLOCK_MASK       GDK_MOD2_MASK
 
 /* Map the specified keyval/modifier setup, dependent on the mode, to either
index abf7473..640f3b0 100644 (file)
--- a/src/vte.c
+++ b/src/vte.c
@@ -4910,8 +4910,13 @@ vte_terminal_read_modifiers (VteTerminal *terminal,
        GdkModifierType modifiers;
 
        /* Read the modifiers. */
-       if (gdk_event_get_state((GdkEvent*)event, &modifiers))
+       if (gdk_event_get_state((GdkEvent*)event, &modifiers)) {
+               GdkKeymap *keymap;
+               keymap = gdk_keymap_get_for_display (
+                               gdk_drawable_get_display (((GdkEventAny *)event)->window));
+               gdk_keymap_add_virtual_modifiers (keymap, &modifiers);
                terminal->pvt->modifiers = modifiers;
+       }
 }
 
 /* Read and handle a keypress event. */