1 |
tetromino 11/11/18 08:48:37 |
2 |
|
3 |
Modified: vte-0.30.1-alt-meta.patch |
4 |
Log: |
5 |
Update meta key patch to fix Alt-? and Alt-/ handling. |
6 |
|
7 |
(Portage version: 2.2.0_alpha75/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.2 x11-libs/vte/files/vte-0.30.1-alt-meta.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/vte/files/vte-0.30.1-alt-meta.patch?rev=1.2&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/vte/files/vte-0.30.1-alt-meta.patch?rev=1.2&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/vte/files/vte-0.30.1-alt-meta.patch?r1=1.1&r2=1.2 |
15 |
|
16 |
Index: vte-0.30.1-alt-meta.patch |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/x11-libs/vte/files/vte-0.30.1-alt-meta.patch,v |
19 |
retrieving revision 1.1 |
20 |
retrieving revision 1.2 |
21 |
diff -u -r1.1 -r1.2 |
22 |
--- vte-0.30.1-alt-meta.patch 15 Nov 2011 08:30:04 -0000 1.1 |
23 |
+++ vte-0.30.1-alt-meta.patch 18 Nov 2011 08:48:37 -0000 1.2 |
24 |
@@ -1,14 +1,61 @@ |
25 |
-From 299e28dd3e5549b13ec54de991d583ac6a6ff11e Mon Sep 17 00:00:00 2001 |
26 |
+From 180dcc578e13c6096e277fb853e7162db640f207 Mon Sep 17 00:00:00 2001 |
27 |
From: Alexandre Rostovtsev <tetromino@g.o> |
28 |
Date: Tue, 15 Nov 2011 03:06:40 -0500 |
29 |
Subject: [PATCH] Map both gdk's Meta and Alt to vte's Meta for >=gtk+-3.2.2 |
30 |
compatibility |
31 |
|
32 |
+Also, since VTE_META_MASK is now a mask with multiple bits set, code that |
33 |
+compares gdk key modifiers to VTE_META_MASK by numerical equality is no |
34 |
+longer guaranteed to work. Therefore, for such comparisons a new function, |
35 |
+vte_keymap_fixup_modifiers, is introduced; it ensures that if any bits |
36 |
+matching matching VTE_META_MASK are set, then all are set. |
37 |
+ |
38 |
https://bugzilla.gnome.org/show_bug.cgi?id=663779 |
39 |
--- |
40 |
+ src/keymap.c | 15 +++++++++++++-- |
41 |
src/keymap.h | 2 +- |
42 |
- 1 files changed, 1 insertions(+), 1 deletions(-) |
43 |
+ 2 files changed, 14 insertions(+), 3 deletions(-) |
44 |
|
45 |
+diff --git a/src/keymap.c b/src/keymap.c |
46 |
+index 9a21669..95b4c5b 100644 |
47 |
+--- a/src/keymap.c |
48 |
++++ b/src/keymap.c |
49 |
+@@ -990,6 +990,17 @@ static const struct _vte_keymap_group { |
50 |
+ {GDK_KEY (F35), _vte_keymap_GDK_F35}, |
51 |
+ }; |
52 |
+ |
53 |
++/* Restrict modifiers to the specified mask and ensure that VTE_META_MASK, |
54 |
++ * despite being a compound mask, is treated as indivisible. */ |
55 |
++GdkModifierType |
56 |
++_vte_keymap_fixup_modifiers(GdkModifierType modifiers, |
57 |
++ GdkModifierType mask) |
58 |
++{ |
59 |
++ if (modifiers & VTE_META_MASK) |
60 |
++ modifiers |= VTE_META_MASK; |
61 |
++ return modifiers & mask; |
62 |
++} |
63 |
++ |
64 |
+ /* Map the specified keyval/modifier setup, dependent on the mode, to either |
65 |
+ * a literal string or a capability name. */ |
66 |
+ void |
67 |
+@@ -1104,7 +1115,7 @@ _vte_keymap_map(guint keyval, |
68 |
+ } else { |
69 |
+ fkey_mode = fkey_default; |
70 |
+ } |
71 |
+- modifiers &= (GDK_SHIFT_MASK | GDK_CONTROL_MASK | VTE_META_MASK | VTE_NUMLOCK_MASK); |
72 |
++ modifiers = _vte_keymap_fixup_modifiers(modifiers, GDK_SHIFT_MASK | GDK_CONTROL_MASK | VTE_META_MASK | VTE_NUMLOCK_MASK); |
73 |
+ |
74 |
+ /* Search for the conditions. */ |
75 |
+ for (i = 0; entries[i].normal_length || entries[i].special[0]; i++) |
76 |
+@@ -1375,7 +1386,7 @@ _vte_keymap_key_add_key_modifiers(guint keyval, |
77 |
+ return; |
78 |
+ } |
79 |
+ |
80 |
+- switch (modifiers & significant_modifiers) { |
81 |
++ switch (_vte_keymap_fixup_modifiers(modifiers, significant_modifiers)) { |
82 |
+ case 0: |
83 |
+ modifier = 0; |
84 |
+ break; |
85 |
diff --git a/src/keymap.h b/src/keymap.h |
86 |
index 243e22e..21d9b8e 100644 |
87 |
--- a/src/keymap.h |
88 |
@@ -23,5 +70,5 @@ |
89 |
|
90 |
/* Map the specified keyval/modifier setup, dependent on the mode, to either |
91 |
-- |
92 |
-1.7.8.rc1 |
93 |
+1.7.8.rc3 |