wok-6.x view vte/stuff/AltKey.patch @ rev 20361
gpgme: didnot find gpgconf
author | Erkan Yilmaz <erkan@slitaz.org> |
---|---|
date | Sat Jun 09 17:33:57 2018 +0000 (2018-06-09) |
parents | |
children |
line source
1 From a9d6a34708f846952f423d078397352858f7b1a4 Mon Sep 17 00:00:00 2001
2 From: Christian Persch <chpe@gnome.org>
3 Date: Sat, 12 May 2012 18:48:05 +0200
4 Subject: [PATCH] keymap: Treat ALT as META
6 https://bugzilla.gnome.org/show_bug.cgi?id=663779
7 ---
8 src/vte.c | 23 ++++++++++++++---------
9 1 files changed, 14 insertions(+), 9 deletions(-)
11 diff --git a/src/vte.c b/src/vte.c
12 index dd27e9a..0657921 100644
13 --- a/src/vte.c
14 +++ b/src/vte.c
15 @@ -5170,19 +5170,24 @@ static void
16 vte_terminal_read_modifiers (VteTerminal *terminal,
17 GdkEvent *event)
18 {
19 + GdkKeymap *keymap;
20 GdkModifierType modifiers;
22 /* Read the modifiers. */
23 - if (gdk_event_get_state((GdkEvent*)event, &modifiers)) {
24 - GdkKeymap *keymap;
25 -#if GTK_CHECK_VERSION (2, 90, 8)
26 - keymap = gdk_keymap_get_for_display(gdk_window_get_display(((GdkEventAny*)event)->window));
27 -#else
28 - keymap = gdk_keymap_get_for_display(gdk_drawable_get_display(((GdkEventAny*)event)->window));
29 + if (!gdk_event_get_state((GdkEvent*)event, &modifiers))
30 + return;
31 +
32 + keymap = gdk_keymap_get_for_display(gdk_window_get_display(((GdkEventAny*)event)->window));
33 +
34 + gdk_keymap_add_virtual_modifiers (keymap, &modifiers);
35 +
36 +#if 1
37 + /* HACK! Treat ALT as META; see bug #663779. */
38 + if (modifiers & GDK_MOD1_MASK)
39 + modifiers |= VTE_META_MASK;
40 #endif
41 - gdk_keymap_add_virtual_modifiers (keymap, &modifiers);
42 - terminal->pvt->modifiers = modifiers;
43 - }
44 +
45 + terminal->pvt->modifiers = modifiers;
46 }
48 /* Read and handle a keypress event. */
49 --
50 1.7.5.1.217.g4e3aa.dirty