обновил сегодня gtk до 2.24.8 на свою голову. через какое-то время с ужасом обнаружил, что в терминале напрочь отвалился Alt. расследование сего печального события привело к тупому фиксу в gtk
commit 32b70a56d13050b6d2b0a570c436da1c303814f3 Author: Michael Natterer <mitch@gimp.org> Date: Mon Nov 7 20:09:00 2011 +0100
gdk: exclude MOD1 from the virtual modifier mapping
which effectively nails down the MOD1 == ALT assumption that is valid in all other parts of GTK+. After the modifier abstraction fixes for OSX, the virtual mapping is now (correctly) used in more places, and caused problems with the common default PC keyboard layout on X11 that colocates ALT and META on the same key. (cherry picked from commit ac943bf69a87c992cfde59c6720ef08fdd20e683)
gdk/x11/gdkkeys-x11.c | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-)
вот нахрена такое делать в стабильной ветке?
пришлось делать свой патчик, чтобы отменить это безобразие. если кому надо
--- gtk+-2.24.8/gdk/x11/gdkkeys-x11.c.orig 2011-11-10 19:38:03.000000000 +0200
+++ gtk+-2.24.8/gdk/x11/gdkkeys-x11.c 2011-11-11 14:14:05.940999734 +0200
@@ -1684,12 +1684,13 @@
keymap = GET_EFFECTIVE_KEYMAP (keymap);
keymap_x11 = GDK_KEYMAP_X11 (keymap);
- /* See comment in add_virtual_modifiers() */
- for (i = 4; i < 8; i++)
+ for (i = 3; i < 8; i++)
{
if ((1 << i) & *modifiers)
{
- if (keymap_x11->modmap[i] & GDK_SUPER_MASK)
+ if (keymap_x11->modmap[i] & GDK_MOD1_MASK)
+ *modifiers |= GDK_MOD1_MASK;
+ else if (keymap_x11->modmap[i] & GDK_SUPER_MASK)
*modifiers |= GDK_SUPER_MASK;
else if (keymap_x11->modmap[i] & GDK_HYPER_MASK)
*modifiers |= GDK_HYPER_MASK;
@@ -1728,16 +1729,12 @@
keymap = GET_EFFECTIVE_KEYMAP (keymap);
keymap_x11 = GDK_KEYMAP_X11 (keymap);
- /* This loop used to start at 3, which included MOD1 in the
- * virtual mapping. However, all of GTK+ treats MOD1 as a
- * synonym for Alt, and does not expect it to be mapped around,
- * therefore it's more sane to simply treat MOD1 like SHIFT and
- * CONTROL, which are not mappable either.
- */
- for (i = 4; i < 8; i++)
+ for (i = 3; i < 8; i++)
{
if ((1 << i) & *state)
{
+ if (keymap_x11->modmap[i] & GDK_MOD1_MASK)
+ *state |= GDK_MOD1_MASK;
if (keymap_x11->modmap[i] & GDK_SUPER_MASK)
*state |= GDK_SUPER_MASK;
if (keymap_x11->modmap[i] & GDK_HYPER_MASK)
@@ -1825,8 +1822,7 @@
{
if (*state & vmods[j])
{
- /* See comment in add_virtual_modifiers() */
- for (i = 4; i < 8; i++)
+ for (i = 3; i < 8; i++)
{
if (keymap_x11->modmap[i] & vmods[j])
{