[gnome-settings-daemon] common: don't pass NULL keymaps to gdk_keymap_* functions



commit bb628128079224eb15da13b9f608c1125d5baee4
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Dec 24 13:04:02 2010 +0100

    common: don't pass NULL keymaps to gdk_keymap_* functions
    
    Before GTK+ 2.91.7, the API allowed to passs NULL to mean the default
    keymap, now it's not allowed anymore.

 plugins/common/eggaccelerators.c |    2 +-
 plugins/common/gsd-keygrab.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/common/eggaccelerators.c b/plugins/common/eggaccelerators.c
index 51689bf..3ef6ef6 100644
--- a/plugins/common/eggaccelerators.c
+++ b/plugins/common/eggaccelerators.c
@@ -368,7 +368,7 @@ egg_accelerator_parse_virtual (const gchar            *accelerator,
 	      GdkKeymapKey *keys;
 	      gint n_keys, i, j;
 
-	      if (!gdk_keymap_get_entries_for_keyval (NULL, keyval, &keys, &n_keys)) {
+	      if (!gdk_keymap_get_entries_for_keyval (gdk_keymap_get_default (), keyval, &keys, &n_keys)) {
  	 	bad_keyval = TRUE;
 	      } else {
 		*accelerator_codes = g_new0 (guint, n_keys + 1);
diff --git a/plugins/common/gsd-keygrab.c b/plugins/common/gsd-keygrab.c
index ab01ccd..464f6e8 100644
--- a/plugins/common/gsd-keygrab.c
+++ b/plugins/common/gsd-keygrab.c
@@ -257,7 +257,7 @@ match_key (Key *key, XEvent *event)
 		group = (event->xkey.state & GDK_KEY_Mode_switch) ? 1 : 0;
 
 	/* Check if we find a keysym that matches our current state */
-	if (gdk_keymap_translate_keyboard_state (NULL, event->xkey.keycode,
+	if (gdk_keymap_translate_keyboard_state (gdk_keymap_get_default (), event->xkey.keycode,
 					     event->xkey.state, group,
 					     &keyval, NULL, NULL, &consumed)) {
 		guint lower, upper;



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