[gnome-settings-daemon] keyboard: Don't start if XKB isn't supported
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] keyboard: Don't start if XKB isn't supported
- Date: Thu, 26 Apr 2012 18:40:23 +0000 (UTC)
commit 04643f67957780490d47b1e9a5fcc7866cdc76a2
Author: Bastien Nocera <hadess hadess net>
Date: Thu Apr 26 19:35:57 2012 +0100
keyboard: Don't start if XKB isn't supported
plugins/keyboard/gsd-keyboard-manager.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/plugins/keyboard/gsd-keyboard-manager.c b/plugins/keyboard/gsd-keyboard-manager.c
index eab6af1..6526148 100644
--- a/plugins/keyboard/gsd-keyboard-manager.c
+++ b/plugins/keyboard/gsd-keyboard-manager.c
@@ -480,8 +480,9 @@ check_xkb_extension (GsdKeyboardManager *manager)
{
Display *dpy = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
int opcode, error_base, major, minor;
+ gboolean have_xkb;
- manager->priv->have_xkb = XkbQueryExtension (dpy,
+ have_xkb = XkbQueryExtension (dpy,
&opcode,
&manager->priv->xkb_event_base,
&error_base,
@@ -489,7 +490,7 @@ check_xkb_extension (GsdKeyboardManager *manager)
&minor)
&& XkbUseExtension (dpy, &major, &minor);
- return manager->priv->have_xkb;
+ return have_xkb;
}
static void
@@ -737,6 +738,11 @@ gsd_keyboard_manager_start (GsdKeyboardManager *manager,
{
gnome_settings_profile_start (NULL);
+ if (check_xkb_extension (manager) == FALSE) {
+ g_debug ("XKB is not supported, not applying any settings");
+ return TRUE;
+ }
+
manager->priv->start_idle_id = g_idle_add ((GSourceFunc) start_keyboard_idle_cb, manager);
gnome_settings_profile_end (NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]