[gnome-settings-daemon] Filter invalid layouts before looking for the index of one passed by gdm
- From: Sergey V. Udaltsov <svu src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] Filter invalid layouts before looking for the index of one passed by gdm
- Date: Sat, 5 Dec 2009 02:39:26 +0000 (UTC)
commit 6f49f97b34d1de0f8e139105d5acafc0c7d4d2ab
Author: Vincent Untz <vuntz gnome org>
Date: Fri Dec 4 18:50:03 2009 +0100
Filter invalid layouts before looking for the index of one passed by gdm
It's important to filter before we look for the index of the layout
passed by gdm, else, since some layouts might be removed by the filter,
the index we got might be wrong.
https://bugzilla.gnome.org/show_bug.cgi?id=585868
plugins/keyboard/gsd-keyboard-xkb.c | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/plugins/keyboard/gsd-keyboard-xkb.c b/plugins/keyboard/gsd-keyboard-xkb.c
index cb969e3..e7d6644 100644
--- a/plugins/keyboard/gsd-keyboard-xkb.c
+++ b/plugins/keyboard/gsd-keyboard-xkb.c
@@ -295,6 +295,20 @@ apply_xkb_settings (void)
gkbd_keyboard_config_load_from_x_current (¤t_sys_kbd_config,
NULL);
+ if (!try_activating_xkb_config_if_new (¤t_sys_kbd_config)) {
+ if (filter_xkb_config ()) {
+ if (!try_activating_xkb_config_if_new (¤t_sys_kbd_config)) {
+ g_warning ("Could not activate the filtered XKB configuration");
+ activation_error ();
+ }
+ } else {
+ g_warning ("Could not activate the XKB configuration");
+ activation_error ();
+ }
+ } else
+ xkl_debug (100,
+ "Actual KBD configuration was not changed: redundant notification\n");
+
if (gdm_layout != NULL) {
/* If there are multiple layouts,
* try to find the one closest to the gdm layout
@@ -315,20 +329,6 @@ apply_xkb_settings (void)
g_free (gdm_layout);
- if (!try_activating_xkb_config_if_new (¤t_sys_kbd_config)) {
- if (filter_xkb_config ()) {
- if (!try_activating_xkb_config_if_new (¤t_sys_kbd_config)) {
- g_warning ("Could not activate the filtered XKB configuration");
- activation_error ();
- }
- } else {
- g_warning ("Could not activate the XKB configuration");
- activation_error ();
- }
- } else
- 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]