[vte] Really fix Bug 601926 - Don't hardcode meta to alt



commit 724195be5ba53c45d650366a8e029939c20d43a4
Author: Behdad Esfahbod <behdad behdad org>
Date:   Tue Aug 24 16:53:17 2010 -0400

    Really fix Bug 601926 - Don't hardcode meta to alt
    
    Correct fix applied this time.  Tested, Alt is not broken by this
    change.

 configure.in |    2 +-
 src/keymap.h |    2 +-
 src/vte.c    |    7 ++++++-
 3 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/configure.in b/configure.in
index d3b8bf9..8bc3b57 100644
--- a/configure.in
+++ b/configure.in
@@ -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
diff --git a/src/keymap.h b/src/keymap.h
index 3a4cefe..243e22e 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -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
diff --git a/src/vte.c b/src/vte.c
index abf7473..640f3b0 100644
--- 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. */



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