[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#689869: unblock: gtk+3.0/3.4.2-4



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package gtk+3.0

It fixes an annoying bug where the F10 key is not properly handled but
treated like Shift+F10.

Full debdiff is attached.

unblock gtk+3.0/3.4.2-4

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru gtk+3.0-3.4.2/debian/changelog gtk+3.0-3.4.2/debian/changelog
--- gtk+3.0-3.4.2/debian/changelog	2012-08-06 22:07:47.000000000 +0200
+++ gtk+3.0-3.4.2/debian/changelog	2012-09-21 18:30:43.000000000 +0200
@@ -1,3 +1,11 @@
+gtk+3.0 (3.4.2-4) unstable; urgency=low
+
+  * debian/patches/074_try-harder-to-discriminate-Shift-F10-and-F10.patch:
+    With xkb-data 2.5.1-2.1 preserving the Shift modifier, GTK+ can properly
+    map F10 and Shift-F10 to different key bindings. Closes: #658392
+
+ -- Michael Biebl <biebl@debian.org>  Fri, 21 Sep 2012 18:30:41 +0200
+
 gtk+3.0 (3.4.2-3) unstable; urgency=low
 
   [ Josselin Mouette ]
diff -Nru gtk+3.0-3.4.2/debian/patches/074_try-harder-to-discriminate-Shift-F10-and-F10.patch gtk+3.0-3.4.2/debian/patches/074_try-harder-to-discriminate-Shift-F10-and-F10.patch
--- gtk+3.0-3.4.2/debian/patches/074_try-harder-to-discriminate-Shift-F10-and-F10.patch	1970-01-01 01:00:00.000000000 +0100
+++ gtk+3.0-3.4.2/debian/patches/074_try-harder-to-discriminate-Shift-F10-and-F10.patch	2012-09-04 03:06:32.000000000 +0200
@@ -0,0 +1,69 @@
+From 314b6abbe8d8daae1e2de50b15cc9b6553af1f3d Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Sat, 1 Sep 2012 22:51:18 -0400
+Subject: [PATCH] Try harder to discriminate Shift-F10 and F10
+
+A change in xkeyboard-config 2.4.1 made it so that function keys
+now have a shift level which has the same symbol, but 'eats' the
+shift modifier. This would ordinarily make it impossible for us
+to discriminate between these key combinations.
+
+This commit tries harder to discriminate in 2 ways:
+- XKB has a mechanism to tell us when a modifier should not be
+  consumed even though it was used in determining the level.
+  We now respect such 'preserved' modifiers. This does not fix
+  the Shift-F10 vs F10 problem yet, since xkeyboard-config does
+  not currently mark Shift as preserved for function keys.
+- Don't consume modifiers that do not change the symbol. For
+  the function keys, the symbol on the shift level is the same
+  as the base level, so we don't consider Shift consumed.
+
+For more background on the xkeyboard-config change, see
+https://bugs.freedesktop.org/show_bug.cgi?id=45008
+
+https://bugzilla.gnome.org/show_bug.cgi?id=661973
+---
+ gdk/x11/gdkkeys-x11.c | 20 +++++++++++++++-----
+ 1 file changed, 15 insertions(+), 5 deletions(-)
+
+Index: gtk+-3.4.2/gdk/x11/gdkkeys-x11.c
+===================================================================
+--- gtk+-3.4.2.orig/gdk/x11/gdkkeys-x11.c	2012-05-02 14:05:07.000000000 +0200
++++ gtk+-3.4.2/gdk/x11/gdkkeys-x11.c	2012-09-04 03:05:24.621782410 +0200
+@@ -1113,6 +1113,8 @@
+         int found = 0;
+ 
+         for (i=0,entry=type->map;i<type->map_count;i++,entry++) {
++            if (!entry->active)
++              continue;
+             if (mods_rtrn) {
+                 int bits = 0;
+                 unsigned long tmp = entry->mods.mask;
+@@ -1123,14 +1125,22 @@
+                 }
+                 /* We always add one-modifiers levels to mods_rtrn since
+                  * they can't wipe out bits in the state unless the
+-                 * level would be triggered. But return other modifiers
+-                 *
++                 * level would be triggered. But not if they don't change
++                 * the symbol (otherwise we can't discriminate Shift-F10
++                 * and F10 anymore). And don't add modifiers that are
++                 * explicitly marked as preserved, either.
+                  */
+-                if (bits == 1 || (mods&type->mods.mask)==entry->mods.mask)
+-                    *mods_rtrn |= entry->mods.mask;
++                if ((bits == 1 && syms[col+entry->level] != syms[col]) ||
++                    (mods&type->mods.mask) == entry->mods.mask)
++                  {
++                    if (type->preserve)
++                      *mods_rtrn |= (entry->mods.mask & ~type->preserve[i].mask);
++                    else
++                      *mods_rtrn |= entry->mods.mask;
++                  }
+             }
+ 
+-            if (!found&&entry->active&&((mods&type->mods.mask)==entry->mods.mask)) {
++            if (!found&&((mods&type->mods.mask)==entry->mods.mask)) {
+                 col+= entry->level;
+                 if (type->preserve)
+                     preserve= type->preserve[i].mask;
diff -Nru gtk+3.0-3.4.2/debian/patches/series gtk+3.0-3.4.2/debian/patches/series
--- gtk+3.0-3.4.2/debian/patches/series	2012-08-06 20:18:31.000000000 +0200
+++ gtk+3.0-3.4.2/debian/patches/series	2012-09-04 03:05:03.000000000 +0200
@@ -11,3 +11,4 @@
 071_fix-installation-of-HTML-images.patch
 072_statusicon_icon_size.patch
 073_transparent_colors.patch
+074_try-harder-to-discriminate-Shift-F10-and-F10.patch

Reply to: