gnome-settings-daemon r255 - in trunk: . plugins/keybindings plugins/media-keys



Author: jensg
Date: Mon Mar 31 20:05:50 2008
New Revision: 255
URL: http://svn.gnome.org/viewvc/gnome-settings-daemon?rev=255&view=rev

Log:
2008-03-31  Jens Granseuer  <jensgr gmx net>

	* plugins/keybindings/gsd-keybindings-manager.c: (do_grab):
	* plugins/media-keys/gsd-media-keys-manager.c: (grab_key): don't try to
	add grabs with invalid modifiers


Modified:
   trunk/ChangeLog
   trunk/plugins/keybindings/gsd-keybindings-manager.c
   trunk/plugins/media-keys/gsd-media-keys-manager.c

Modified: trunk/plugins/keybindings/gsd-keybindings-manager.c
==============================================================================
--- trunk/plugins/keybindings/gsd-keybindings-manager.c	(original)
+++ trunk/plugins/keybindings/gsd-keybindings-manager.c	Mon Mar 31 20:05:50 2008
@@ -295,7 +295,11 @@
         }
 }
 
-/* inspired from all_combinations from gnome-panel/gnome-panel/global-keys.c */
+/* Grab the key. In order to ignore IGNORED_MODS we need to grab
+ * all combinations of the ignored modifiers and those actually used
+ * for the binding (if any).
+ *
+ * inspired by all_combinations from gnome-panel/gnome-panel/global-keys.c */
 #define N_BITS 32
 static void
 do_grab (GsdKeybindingsManager *manager,
@@ -307,7 +311,7 @@
         int   bit;
         int   bits_set_cnt;
         int   uppervalue;
-        guint mask_to_traverse = IGNORED_MODS & ~ key->state;
+        guint mask_to_traverse = IGNORED_MODS & ~key->state & GDK_MODIFIER_MASK;
 
         bit = 0;
         for (i = 0; i < N_BITS; i++) {

Modified: trunk/plugins/media-keys/gsd-media-keys-manager.c
==============================================================================
--- trunk/plugins/media-keys/gsd-media-keys-manager.c	(original)
+++ trunk/plugins/media-keys/gsd-media-keys-manager.c	Mon Mar 31 20:05:50 2008
@@ -305,7 +305,11 @@
         return TRUE;
 }
 
-/* inspired from all_combinations from gnome-panel/gnome-panel/global-keys.c */
+/* Grab the key. In order to ignore IGNORED_MODS we need to grab
+ * all combinations of the ignored modifiers and those actually used
+ * for the binding (if any).
+ *
+ * inspired by all_combinations from gnome-panel/gnome-panel/global-keys.c */
 #define N_BITS 32
 static void
 grab_key (GsdMediaKeysManager *manager,
@@ -317,7 +321,7 @@
         int   bit;
         int   bits_set_cnt;
         int   uppervalue;
-        guint mask_to_traverse = IGNORED_MODS & ~ key->state;
+        guint mask_to_traverse = IGNORED_MODS & ~key->state & GDK_MODIFIER_MASK;
 
         bit = 0;
         for (i = 0; i < N_BITS; i++) {



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