diff -Nru gnome-settings-daemon-3.4.2/debian/changelog gnome-settings-daemon-3.4.2/debian/changelog --- gnome-settings-daemon-3.4.2/debian/changelog 2012-06-12 04:21:43.000000000 +0800 +++ gnome-settings-daemon-3.4.2/debian/changelog 2012-06-14 11:31:14.000000000 +0800 @@ -1,3 +1,12 @@ +gnome-settings-daemon (3.4.2-0ubuntu5) quantal; urgency=low + + * debian/patches/git-mask-out-virtual-modifiers.patch + - patch from upstream git, fix the grabbing issue of the + keyboard shortcut with virtual (Super, Hyper, Meta) modifier. + (lp: #950160) + + -- Keng-Yu Lin Thu, 14 Jun 2012 11:25:51 +0800 + gnome-settings-daemon (3.4.2-0ubuntu4) quantal; urgency=low * debian/patches/62_unity_disable_gsd_printer.patch: gracefully exit the diff -Nru gnome-settings-daemon-3.4.2/debian/patches/git-mask-out-virtual-modifiers.patch gnome-settings-daemon-3.4.2/debian/patches/git-mask-out-virtual-modifiers.patch --- gnome-settings-daemon-3.4.2/debian/patches/git-mask-out-virtual-modifiers.patch 1970-01-01 08:00:00.000000000 +0800 +++ gnome-settings-daemon-3.4.2/debian/patches/git-mask-out-virtual-modifiers.patch 2012-06-14 11:24:52.000000000 +0800 @@ -0,0 +1,47 @@ +From 53cbbc00df3884bc3ca87e2818a08ba3ba2fabac Mon Sep 17 00:00:00 2001 +From: Keng-Yu Lin +Date: Tue, 22 May 2012 15:11:26 +0800 +Subject: [PATCH] common: mask out virtual modifiers in key grabbing code + +gdk_keymap_map_virtual_modifiers converts all the virtual +modifiers in the state mask (Super, Hyper, Meta, etc) of a +key event to the real modifiers they're mapped to. This +call is needed, because XGrabKey and friends only work +with real modifiers (Mod1, Mod2, ...). + +Unforunately, gdk_keymap_map_virtual_modifiers doesn't mask +out the virtual modifers, it merely adds in the associated +real ones. + +This commit does the masking immediately following the call, +so that virtual modifier don't ultimately get passed to X +when setting up the key grabs. + +https://bugzilla.gnome.org/show_bug.cgi?id=676300 +--- + plugins/common/gsd-keygrab.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/plugins/common/gsd-keygrab.c b/plugins/common/gsd-keygrab.c +index f8432cd..bb85b87 100644 +--- a/plugins/common/gsd-keygrab.c ++++ b/plugins/common/gsd-keygrab.c +@@ -153,6 +153,7 @@ grab_key_unsafe (Key *key, + /* XGrabKey requires real modifiers, not virtual ones */ + modifiers = key->state; + gdk_keymap_map_virtual_modifiers (gdk_keymap_get_default (), &modifiers); ++ modifiers &= ~(GDK_META_MASK | GDK_SUPER_MASK | GDK_HYPER_MASK); + + /* If key doesn't have a usable modifier, we don't want + * to grab it, since the user might lose a useful key. +@@ -324,6 +325,7 @@ match_xi2_key (Key *key, XIDeviceEvent *event) + * the XEvent will be using the real modifier, so translate those */ + mask = key->state; + gdk_keymap_map_virtual_modifiers (gdk_keymap_get_default (), &mask); ++ mask &= ~(GDK_META_MASK | GDK_SUPER_MASK | GDK_HYPER_MASK); + + gdk_keyval_convert_case (keyval, &lower, &upper); + +-- +1.7.9.5 + diff -Nru gnome-settings-daemon-3.4.2/debian/patches/series gnome-settings-daemon-3.4.2/debian/patches/series --- gnome-settings-daemon-3.4.2/debian/patches/series 2012-06-12 04:21:43.000000000 +0800 +++ gnome-settings-daemon-3.4.2/debian/patches/series 2012-06-14 11:25:37.000000000 +0800 @@ -27,3 +27,4 @@ power-check-null-devices.patch power-ignore-bad-dbus-requests.patch xsettings_signal_handling.patch +git-mask-out-virtual-modifiers.patch