gnome-settings-daemon r279 - in trunk: . plugins/a11y-keyboard
- From: jensg svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-settings-daemon r279 - in trunk: . plugins/a11y-keyboard
- Date: Wed, 9 Apr 2008 17:57:39 +0100 (BST)
Author: jensg
Date: Wed Apr 9 17:57:39 2008
New Revision: 279
URL: http://svn.gnome.org/viewvc/gnome-settings-daemon?rev=279&view=rev
Log:
2008-04-09 Jens Granseuer <jensgr gmx net>
* plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c: (xkb_enabled),
(get_xkb_desc_rec), (gsd_a11y_keyboard_manager_start): don't install
any listeners or callbacks when XKB is not available
Modified:
trunk/ChangeLog
trunk/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
Modified: trunk/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
==============================================================================
--- trunk/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c (original)
+++ trunk/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c Wed Apr 9 17:57:39 2008
@@ -89,15 +89,9 @@
static gboolean
xkb_enabled (GsdA11yKeyboardManager *manager)
{
- static gboolean initialized = 0;
- static gboolean have_xkb = 0;
-
+ gboolean have_xkb;
int opcode, errorBase, major, minor;
- if (initialized) {
- return have_xkb;
- }
-
gdk_error_trap_push ();
have_xkb = XkbQueryExtension (GDK_DISPLAY (),
&opcode,
@@ -118,9 +112,6 @@
XkbDescRec *desc;
Status status = Success; /* Any bogus value, to suppress warning */
- if (! xkb_enabled (manager))
- return NULL;
-
gdk_error_trap_push ();
desc = XkbGetMap (GDK_DISPLAY (), XkbAllMapComponentsMask, XkbUseCoreKbd);
if (desc != NULL) {
@@ -732,20 +723,10 @@
{
guint event_mask;
GConfClient *client;
- gboolean ret;
-
- ret = FALSE;
+ gboolean ret = FALSE;
g_debug ("Starting a11y_keyboard manager");
gnome_settings_profile_start (NULL);
- register_config_callback (manager,
- CONFIG_ROOT,
- (GConfClientNotifyFunc)keyboard_callback);
-
- event_mask = XkbControlsNotifyMask;
-#ifdef DEBUG_ACCESSIBILITY
- event_mask |= XkbAccessXNotifyMask; /* make default when AXN_AXKWarning works */
-#endif
if (!xkb_enabled (manager)) {
g_set_error (error, GSD_KBD_A11Y_ERROR,
@@ -754,6 +735,15 @@
goto out;
}
+ register_config_callback (manager,
+ CONFIG_ROOT,
+ (GConfClientNotifyFunc) keyboard_callback);
+
+ event_mask = XkbControlsNotifyMask;
+#ifdef DEBUG_ACCESSIBILITY
+ event_mask |= XkbAccessXNotifyMask; /* make default when AXN_AXKWarning works */
+#endif
+
client = gconf_client_get_default ();
/* be sure to init before starting to monitor the server */
set_server_from_gconf (manager, client);
@@ -769,7 +759,7 @@
gdk_error_trap_pop ();
gdk_window_add_filter (NULL,
- (GdkFilterFunc)cb_xkb_event_filter,
+ (GdkFilterFunc) cb_xkb_event_filter,
manager);
ret = TRUE;
out:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]