wok-current annotate vte/stuff/AltKey.patch @ rev 19722

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