[libxfce4ui] patch to fix bug #1095362

nonamedotc nonamedotc at fedoraproject.org
Sat May 17 02:25:03 UTC 2014


commit ed26f798bcc2acd572c452299414124dd1c584b9
Author: nonamedotc <nonamedotc at fedoraproject.org>
Date:   Fri May 16 21:24:58 2014 -0500

    patch to fix bug #1095362
    
    - patch13 - enable-shortcut.patch

 enable-shift-modifier-in-shortcut-dialog.patch  |   28 +++++++++++++++
 enable-shift-modifier-in-shortcut-grabber.patch |   43 +++++++++++++++++++++++
 enable-shortcut.patch                           |   11 ++++++
 libxfce4ui.spec                                 |   23 +++++++++++-
 4 files changed, 103 insertions(+), 2 deletions(-)
---
diff --git a/enable-shift-modifier-in-shortcut-dialog.patch b/enable-shift-modifier-in-shortcut-dialog.patch
new file mode 100644
index 0000000..a05646d
--- /dev/null
+++ b/enable-shift-modifier-in-shortcut-dialog.patch
@@ -0,0 +1,28 @@
+commit 7324dea66d754ff863fea3362c90acc9689670c6
+Author: Harald Judt <h.judt at gmx.at>
+Date:   Fri May 4 22:15:16 2012 +0200
+
+    Enable <Shift> as modifier key in shortcut dialog.
+    
+    This restores the functionality of <Shift> as a modifier key.
+    Using <Shift_L> and <Shift_R> as a single key is still possible.
+    
+    It seems gtk_accelerator_name is not designed to distinguish between
+    upper-/lowercase, so we just store the <Shift> key in the accelerator
+    name. This might not be the recommended way to store accelerators
+    as specified by the GTK docs, but at least it fixes the regression
+    and seems to not cause any troubles.
+
+diff --git a/libxfce4kbd-private/xfce-shortcut-dialog.c b/libxfce4kbd-private/xfce-shortcut-dialog.c
+index 5f1b058..b1ce159 100644
+--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
++++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
+@@ -327,6 +327,8 @@ xfce_shortcut_dialog_key_pressed (XfceShortcutDialog *dialog,
+                                        &keyval, NULL, NULL, &consumed);
+ 
+   /* Get the modifiers */
++  if ((modifiers & GDK_SHIFT_MASK) && (consumed & GDK_SHIFT_MASK))
++    consumed &= ~GDK_SHIFT_MASK;
+   modifiers &= ~consumed;
+   modifiers &= mod_mask;
+ 
diff --git a/enable-shift-modifier-in-shortcut-grabber.patch b/enable-shift-modifier-in-shortcut-grabber.patch
new file mode 100644
index 0000000..1a97bcc
--- /dev/null
+++ b/enable-shift-modifier-in-shortcut-grabber.patch
@@ -0,0 +1,43 @@
+commit fe4aff6a20024d9480199e19c13614dd118be725
+Author: Harald Judt <h.judt at gmx.at>
+Date:   Fri May 4 22:24:12 2012 +0200
+
+    Enable <Shift> as modifier key in shortcuts grabber.
+    
+    This restores the functionality of <Shift> as a modifier key.
+    Using <Shift_L> and <Shift_R> as a single key is still possible.
+    
+    It seems gtk_accelerator_name is not designed to distinguish between
+    upper-/lowercase, so we just store the <Shift> key in the accelerator
+    name. This might not be the recommended way to store accelerators
+    as specified by the GTK docs, but at least it fixes the regression
+    and seems to not cause any troubles.
+    
+    Additionally, we need to gtk_accelerator_parse the value returned by
+    gtk_accelerator_name, because the key values of both functions are
+    not consistent.
+
+diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c b/libxfce4kbd-private/xfce-shortcuts-grabber.c
+index 9faec07..01b85c3 100644
+--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
++++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
+@@ -512,8 +512,10 @@ xfce_shortcuts_grabber_event_filter (GdkXEvent            *gdk_xevent,
+                                        &keyval, NULL, NULL, &consumed);
+ 
+   /* Get the modifiers */
+-  modifiers &= ~consumed;
++  if ((modifiers & GDK_SHIFT_MASK) && (consumed & GDK_SHIFT_MASK))
++    consumed &= ~GDK_SHIFT_MASK;
+   gdk_keymap_add_virtual_modifiers (keymap, &modifiers);
++  modifiers &= ~consumed;
+   modifiers &= mod_mask;
+ 
+   context.keyval = keyval;
+@@ -521,6 +523,7 @@ xfce_shortcuts_grabber_event_filter (GdkXEvent            *gdk_xevent,
+ 
+   raw_shortcut_name = gtk_accelerator_name (keyval, modifiers);
+   TRACE ("Looking for %s", raw_shortcut_name);
++  gtk_accelerator_parse (raw_shortcut_name, &context.keyval, &context.modifiers);
+   g_free (raw_shortcut_name);
+ 
+   g_hash_table_foreach (grabber->priv->keys, (GHFunc) find_event_key, &context);
diff --git a/enable-shortcut.patch b/enable-shortcut.patch
new file mode 100644
index 0000000..5ff92be
--- /dev/null
+++ b/enable-shortcut.patch
@@ -0,0 +1,11 @@
+--- libxfce4kbd-private/xfce-shortcuts-grabber.c.orig	2012-04-28 14:46:52.000000000 -0500
++++ libxfce4kbd-private/xfce-shortcuts-grabber.c	2014-05-13 11:15:33.195020180 -0500
+@@ -313,7 +313,7 @@
+     TRACE ("Ungrabbing %s", shortcut_name);
+ 
+   TRACE ("Keyval: %d", key->keyval);
+-  TRACE ("Modifiers: 0x%x", key->modifiers);
++  TRACE ("Modifiers: 0x%x", modifiers);
+ 
+   g_free (shortcut_name);
+ 
diff --git a/libxfce4ui.spec b/libxfce4ui.spec
index 9c1a5df..1eb1296 100644
--- a/libxfce4ui.spec
+++ b/libxfce4ui.spec
@@ -2,9 +2,9 @@
 
 %global xfceversion 4.10
 
-Name:           libxfce4ui
+Name:		libxfce4ui
 Version:        4.10.0
-Release:        9%{?dist}
+Release:        11%{?dist}
 Summary:        Commonly used Xfce widgets
 
 Group:          System Environment/Libraries
@@ -17,6 +17,13 @@ Patch1:         libxfce4ui-4.10.0-avoid-double-fork.patch
 ## Downstream patches
 # add more keyboard shortcuts to make multimedia keyboards work out of the box
 Patch10:        libxfce4ui-4.10.0-keyboard-shortcuts.patch
+
+# upstream patches to fix 1095362
+# source of patches - https://bugzilla.xfce.org/show_bug.cgi?id=8744
+Patch11:	enable-shift-modifier-in-shortcut-dialog.patch
+Patch12:	enable-shift-modifier-in-shortcut-grabber.patch
+Patch13:	enable-shortcut.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  pkgconfig(gobject-2.0) >= 2.24.0
@@ -73,6 +80,9 @@ developing applications that use %{name}.
 %setup -q
 %patch1 -p1
 %patch10 -p1 -b .shortcuts
+%patch11 -p1
+%patch12 -p1
+%patch13
 
 %build
 %configure --enable-gtk-doc \
@@ -141,6 +151,15 @@ rm -rf %{buildroot}
 %endif
 
 %changelog
+* Fri May 16 2014 Mukundan Ragavan <nonamedotc at fedoraproject.org> - 4.10.0-11
+- patch to fix bug #1095362
+- patch13 - enable-shortcut.patch
+
+* Fri May 16 2014 Mukundan Ragavan <nonamedotc at fedoraproject.org> - 4.10.0-10
+- Add patches to fix bug #1095362
+- Patch11 - enable-shift-modifier-in-shortcut-dialog.patch
+- Patch12 - enable-shift-modifier-in-shortcut-grabber.patch
+
 * Wed Nov 06 2013 Kevin Fenzi <kevin at scrye.com> 4.10.0-9
 - Add patch to fix double fork issue that prevents some apps from running from the menu. 
 - Fixes bug #879922


More information about the scm-commits mailing list