r11088 - in /desktop/unstable/vte/debian: changelog patches/90_ctrl-key-fix.patch
lool at users.alioth.debian.org
lool at users.alioth.debian.org
Tue May 22 08:58:09 UTC 2007
Author: lool
Date: Tue May 22 08:58:08 2007
New Revision: 11088
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=11088
Log:
* New patch, 90_ctrl-key-fix, fixes Ctrl-key combination yeilding just key;
from SVN r1893; GNOME #375112.
Added:
desktop/unstable/vte/debian/patches/90_ctrl-key-fix.patch
Modified:
desktop/unstable/vte/debian/changelog
Modified: desktop/unstable/vte/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/vte/debian/changelog?rev=11088&op=diff
==============================================================================
--- desktop/unstable/vte/debian/changelog (original)
+++ desktop/unstable/vte/debian/changelog Tue May 22 08:58:08 2007
@@ -1,3 +1,10 @@
+vte (1:0.16.3-2) UNRELEASED; urgency=low
+
+ * New patch, 90_ctrl-key-fix, fixes Ctrl-key combination yeilding just key;
+ from SVN r1893; GNOME #375112.
+
+ -- Loic Minier <lool at dooz.org> Tue, 22 May 2007 10:57:39 +0200
+
vte (1:0.16.3-1) unstable; urgency=low
* New upstream release; no API change.
Added: desktop/unstable/vte/debian/patches/90_ctrl-key-fix.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/vte/debian/patches/90_ctrl-key-fix.patch?rev=11088&op=file
==============================================================================
--- desktop/unstable/vte/debian/patches/90_ctrl-key-fix.patch (added)
+++ desktop/unstable/vte/debian/patches/90_ctrl-key-fix.patch Tue May 22 08:58:08 2007
@@ -1,0 +1,80 @@
+GNOME #375112; fixes Ctrl-key combination yeilding just key; from SVN r1893.
+
+2007-05-22 Chris Wilson <chris at chris-wilson.co.uk>
+
+ Bug 375112 â ctrl-key combinations yielding just key
+ Original patch by <samo at altern.org> and refactored by Loïc Minier.
+
+ * src/vte.c (vte_translate_national_ctrlkeys),
+ (vte_terminal_key_press), (vte_terminal_scroll):
+ When cooking a string to pass through to the client obtain a
+ "raw" keyval.
+
+Index: src/vte.c
+===================================================================
+--- src/vte.c (revision 1892)
++++ src/vte.c (revision 1893)
+@@ -63,6 +63,10 @@ typedef gunichar wint_t;
+ #define howmany(x, y) (((x) + ((y) - 1)) / (y))
+ #endif
+
++#if !GTK_CHECK_VERSION(2,2,0)
++#define gdk_keymap_get_for_display(dpy) gdk_keymap_get_default()
++#endif
++
+ static void vte_terminal_set_visibility (VteTerminal *terminal, GdkVisibilityState state);
+ static void vte_terminal_set_termcap(VteTerminal *terminal, const char *path,
+ gboolean reset);
+@@ -4058,6 +4062,31 @@ remove_cursor_timeout (VteTerminal *term
+ terminal->pvt->cursor_blink_tag = VTE_INVALID_SOURCE;
+ }
+
++/*
++ * Translate national keys with Crtl|Alt modifier
++ * Refactored from http://bugzilla.gnome.org/show_bug.cgi?id=375112
++ */
++static guint
++vte_translate_national_ctrlkeys (GdkEventKey *event)
++{
++ guint keyval;
++ GdkModifierType consumed_modifiers;
++ GdkKeymap *keymap;
++
++ keymap = gdk_keymap_get_for_display (
++ gdk_drawable_get_display (event->window));
++
++ gdk_keymap_translate_keyboard_state (keymap,
++ event->hardware_keycode, event->state,
++ 0, /* Force 0 group (English) */
++ &keyval, NULL, NULL, &consumed_modifiers);
++
++ _vte_debug_print (VTE_DEBUG_EVENTS,
++ "ctrl+Key, group=%d de-grouped into keyval=0x%x\n",
++ event->group, keyval);
++
++ return keyval;
++}
+
+ /* Read and handle a keypress event. */
+ static gint
+@@ -4349,6 +4378,10 @@ vte_terminal_key_press(GtkWidget *widget
+ /* If we didn't manage to do anything, try to salvage a
+ * printable string. */
+ if (handled == FALSE && normal == NULL && special == NULL) {
++ if (event->group &&
++ (terminal->pvt->modifiers & GDK_CONTROL_MASK))
++ keyval = vte_translate_national_ctrlkeys(event);
++
+ /* Convert the keyval to a gunichar. */
+ keychar = gdk_keyval_to_unicode(keyval);
+ normal_length = 0;
+@@ -10184,7 +10217,8 @@ vte_terminal_scroll(GtkWidget *widget, G
+ return FALSE;
+ }
+
+- if (terminal->pvt->screen == &terminal->pvt->alternate_screen) {
++ if (terminal->pvt->screen == &terminal->pvt->alternate_screen ||
++ terminal->pvt->normal_screen.scrolling_restricted) {
+ char *normal;
+ gssize normal_length;
+ const gchar *special;
More information about the pkg-gnome-commits
mailing list