[gnome-settings-daemon/gnome-2-28] Don't die on X servers without XKB
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-2-28] Don't die on X servers without XKB
- Date: Wed, 10 Mar 2010 11:25:11 +0000 (UTC)
commit 262afc040ce3b239899304f2e62650efa5e71a69
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jan 16 11:36:07 2010 +0100
Don't die on X servers without XKB
If you use an X server without XKB, gnome-settings-daemon does not
survive session startup. The reason is that the modmap implementation
of libxklavier returns 0 for max_groups. This makes some of the
max_groups - 1 acrobatics in the keyboard plugin go bad, leading to a
segfault.
Closes bug #604651.
plugins/keyboard/gsd-keyboard-xkb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/keyboard/gsd-keyboard-xkb.c b/plugins/keyboard/gsd-keyboard-xkb.c
index 0933d7e..a36002d 100644
--- a/plugins/keyboard/gsd-keyboard-xkb.c
+++ b/plugins/keyboard/gsd-keyboard-xkb.c
@@ -250,7 +250,7 @@ apply_xkb_settings (void)
GSList *found_node;
int max_groups;
- max_groups = xkl_engine_get_max_num_groups (xkl_engine);
+ max_groups = MAX (xkl_engine_get_max_num_groups (xkl_engine), 1);
layouts = gconf_client_get_list (conf_client,
GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS,
GCONF_VALUE_STRING, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]