wok-current diff vte/stuff/AltKey.patch @ rev 24841

updated libuninameslist and libuninameslist-dev (20190701 -> 20211114)
author Hans-G?nter Theisgen
date Fri Mar 25 09:32:35 2022 +0100 (2022-03-25)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/vte/stuff/AltKey.patch	Fri Mar 25 09:32:35 2022 +0100
     1.3 @@ -0,0 +1,50 @@
     1.4 +From a9d6a34708f846952f423d078397352858f7b1a4 Mon Sep 17 00:00:00 2001
     1.5 +From: Christian Persch <chpe@gnome.org>
     1.6 +Date: Sat, 12 May 2012 18:48:05 +0200
     1.7 +Subject: [PATCH] keymap: Treat ALT as META
     1.8 +
     1.9 +https://bugzilla.gnome.org/show_bug.cgi?id=663779
    1.10 +---
    1.11 + src/vte.c |   23 ++++++++++++++---------
    1.12 + 1 files changed, 14 insertions(+), 9 deletions(-)
    1.13 +
    1.14 +diff --git a/src/vte.c b/src/vte.c
    1.15 +index dd27e9a..0657921 100644
    1.16 +--- a/src/vte.c
    1.17 ++++ b/src/vte.c
    1.18 +@@ -5170,19 +5170,24 @@ static void
    1.19 + vte_terminal_read_modifiers (VteTerminal *terminal,
    1.20 + 			     GdkEvent *event)
    1.21 + {
    1.22 ++        GdkKeymap *keymap;
    1.23 + 	GdkModifierType modifiers;
    1.24 + 
    1.25 + 	/* Read the modifiers. */
    1.26 +-	if (gdk_event_get_state((GdkEvent*)event, &modifiers)) {
    1.27 +-		GdkKeymap *keymap;
    1.28 +-#if GTK_CHECK_VERSION (2, 90, 8)
    1.29 +-                keymap = gdk_keymap_get_for_display(gdk_window_get_display(((GdkEventAny*)event)->window));
    1.30 +-#else
    1.31 +-                keymap = gdk_keymap_get_for_display(gdk_drawable_get_display(((GdkEventAny*)event)->window));
    1.32 ++	if (!gdk_event_get_state((GdkEvent*)event, &modifiers))
    1.33 ++                return;
    1.34 ++
    1.35 ++        keymap = gdk_keymap_get_for_display(gdk_window_get_display(((GdkEventAny*)event)->window));
    1.36 ++
    1.37 ++        gdk_keymap_add_virtual_modifiers (keymap, &modifiers);
    1.38 ++
    1.39 ++#if 1
    1.40 ++        /* HACK! Treat ALT as META; see bug #663779. */
    1.41 ++        if (modifiers & GDK_MOD1_MASK)
    1.42 ++                modifiers |= VTE_META_MASK;
    1.43 + #endif
    1.44 +-                gdk_keymap_add_virtual_modifiers (keymap, &modifiers);
    1.45 +-		terminal->pvt->modifiers = modifiers;
    1.46 +-	}
    1.47 ++
    1.48 ++        terminal->pvt->modifiers = modifiers;
    1.49 + }
    1.50 + 
    1.51 + /* Read and handle a keypress event. */
    1.52 +-- 
    1.53 +1.7.5.1.217.g4e3aa.dirty
    1.54 \ No newline at end of file