Restore alt keys after gtk20 update.

While here convert to OptionsNG.

PR:		ports/176963
Submitted by:	Lawrence Chen <beastie@tardisi.com>
Obtained from:	upstream git / Gnome bug 663779
This commit is contained in:
Koop Mast 2013-03-15 21:39:16 +00:00
parent 018460457d
commit 4cf78eacba
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=314323
2 changed files with 43 additions and 7 deletions

View File

@ -4,7 +4,7 @@
PORTNAME= vte
PORTVERSION= 0.26.2
PORTREVISION?= 3
PORTREVISION?= 4
CATEGORIES= x11-toolkits gnome
MASTER_SITES= GNOME
DIST_SUBDIR= gnome2
@ -30,7 +30,15 @@ CONFIGURE_ARGS?=--disable-python \
--disable-freetypetest
.if !defined(MASTERDIR)
OPTIONS= GLX "Enable support for DRI/GLX rendering" off
OPTIONS_DEFINE= GLX
GLX_DESC= Support for DRI/GLX rendering
.endif
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MGLX} && !defined(MASTERDIR)
CONFIGURE_ARGS+= --with-glX
USE_GL= yes
.endif
.include <bsd.port.pre.mk>
@ -39,11 +47,6 @@ OPTIONS= GLX "Enable support for DRI/GLX rendering" off
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-gnome-pty-helper_gnome-utmp.c
.endif
.if defined(WITH_GLX) && !defined(MASTERDIR)
CONFIGURE_ARGS+= --with-glX
USE_GL= yes
.endif
.include <bsd.port.post.mk>
.endif

View File

@ -0,0 +1,33 @@
--- src/vte.c.orig 2010-11-13 06:18:41.000000000 -0600
+++ src/vte.c 2013-03-14 15:59:37.761401135 -0500
@@ -4914,16 +4914,23 @@
vte_terminal_read_modifiers (VteTerminal *terminal,
GdkEvent *event)
{
+ GdkKeymap *keymap;
GdkModifierType modifiers;
/* Read the 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;
- }
+ if (!gdk_event_get_state((GdkEvent*)event, &modifiers))
+ return;
+
+ keymap = gdk_keymap_get_for_display (
+ gdk_window_get_display (((GdkEventAny*)event)->window));
+
+ gdk_keymap_add_virtual_modifiers (keymap, &modifiers);
+
+ /* HACK! Treat ALT as META; see bug #663779. */
+ if (modifiers & GDK_MOD1_MASK)
+ modifiers |= VTE_META_MASK;
+
+ terminal->pvt->modifiers = modifiers;
}
/* Read and handle a keypress event. */