gnome-settings-daemon r549 - in trunk: . plugins/keyboard



Author: matthiasc
Date: Mon Oct  6 17:10:12 2008
New Revision: 549
URL: http://svn.gnome.org/viewvc/gnome-settings-daemon?rev=549&view=rev

Log:
2008-10-06  Matthias Clasen  <mclasen redhat com>

        Bug 554525 â fix the picking up of the gdm layout

        * plugins/keyboard/gsd-keyboard-xkb.c (apply_xkb_settings): Active
        a specific group only after activating the right keyboard
        configuration. Because the other way around doesn't work.



Modified:
   trunk/ChangeLog
   trunk/plugins/keyboard/gsd-keyboard-xkb.c

Modified: trunk/plugins/keyboard/gsd-keyboard-xkb.c
==============================================================================
--- trunk/plugins/keyboard/gsd-keyboard-xkb.c	(original)
+++ trunk/plugins/keyboard/gsd-keyboard-xkb.c	Mon Oct  6 17:10:12 2008
@@ -142,6 +142,7 @@
 {
         GConfClient *conf_client;
         GkbdKeyboardConfig current_sys_kbd_config;
+        int group_to_activate = -1;
 
         if (!inited_ok)
                 return;
@@ -175,7 +176,7 @@
                          for (i = 0, l = current_kbd_config.layouts_variants; l; i++, l = l->next) {
                                  char *lv = l->data;
                                  if (strncmp (lv, gdm_keyboard_layout, len) == 0 && (lv[len] == '\0' || lv[len] == '\t')) {
-                                        xkl_engine_lock_group (current_config.engine, i);
+                                        group_to_activate = i;
                                         break;
                                  }
                          }
@@ -199,6 +200,8 @@
                 xkl_debug (100,
                            "Actual KBD configuration was not changed: redundant notification\n");
 
+        if (group_to_activate != -1)
+                xkl_engine_lock_group (current_config.engine, group_to_activate);
         gkbd_keyboard_config_term (&current_sys_kbd_config);
 }
 



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