Updating branch refs/heads/jeromeg/keyboard-shortcuts
         to 6633a2deed6ab60fbb02c157a8c9499c1824fb4e (commit)
       from 32a1221559da5a8ca47721607825c765ef83ab9f (commit)

commit 6633a2deed6ab60fbb02c157a8c9499c1824fb4e
Author: Jérôme Guelfucci <jero...@xfce.org>
Date:   Thu Dec 20 10:34:23 2012 +0100

    Fix keyboard shortcuts with keypad (bug #4178).
    
    To do so, we also grab all shortcuts with the numlock modifier.

 libxfce4kbd-private/xfce-shortcuts-grabber.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c 
b/libxfce4kbd-private/xfce-shortcuts-grabber.c
index 0d816a2..dcfc235 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -276,6 +276,10 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber *grabber,
       return;
     }
 
+  numlock_modifier =
+    XkbKeysymToModifiers (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
+                         GDK_KEY_Num_Lock);
+
   for (i = 0; i < n_keys; i ++)
     {
       /* Grab all hardware keys generating keyval */
@@ -291,12 +295,19 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber 
*grabber,
           guint mod_masks [] = {
             0,
             GDK_MOD2_MASK,
+            numlock_modifier | GDK_MOD2_MASK,
             GDK_LOCK_MASK,
+            numlock_modifier | GDK_LOCK_MASK,
             GDK_MOD5_MASK,
+            numlock_modifier | GDK_MOD5_MASK,
             GDK_MOD2_MASK | GDK_LOCK_MASK,
+            numlock_modifier | GDK_MOD2_MASK | GDK_LOCK_MASK,
             GDK_MOD2_MASK | GDK_MOD5_MASK,
+            numlock_modifier | GDK_MOD2_MASK | GDK_MOD5_MASK,
             GDK_LOCK_MASK | GDK_MOD5_MASK,
+            numlock_modifier | GDK_LOCK_MASK | GDK_MOD5_MASK,
             GDK_MOD2_MASK | GDK_LOCK_MASK | GDK_MOD5_MASK,
+            numlock_modifier | GDK_MOD2_MASK | GDK_LOCK_MASK | GDK_MOD5_MASK,
           };
 
 #if GTK_CHECK_VERSION (3, 0, 0)
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to