[Xfce4-commits] <xfce4-xkb-plugin:4.10_panel_support> Check if getting/setting xkl config returns error
Igor Slepchin
noreply at xfce.org
Wed Apr 3 01:44:02 CEST 2013
Updating branch refs/heads/4.10_panel_support
to eaf0e5136c657cb1d040a01d3f1692b5b81373f9 (commit)
from feac42fd57d75680f1dfbdfc9142c859cbd01735 (commit)
commit eaf0e5136c657cb1d040a01d3f1692b5b81373f9
Author: Igor Slepchin <igor.slepchin at gmail.com>
Date: Mon Apr 1 15:56:12 2013 -0400
Check if getting/setting xkl config returns error
panel-plugin/xkb-config.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c
index 23353c2..3d1a26c 100644
--- a/panel-plugin/xkb-config.c
+++ b/panel-plugin/xkb-config.c
@@ -310,7 +310,10 @@ xkb_config_update_settings (t_xkb_settings *settings)
if (settings->kbd_config == NULL || settings->never_modify_config)
{
- xkl_config_rec_get_from_server (config->config_rec, config->engine);
+ if (!xkl_config_rec_get_from_server (config->config_rec, config->engine))
+ {
+ DBG ("ERROR: can't get xkl config: [%s]", xkl_get_last_error());
+ }
if (settings->kbd_config == NULL)
settings->kbd_config = g_new0 (t_xkb_kbd_config, 1);
@@ -398,7 +401,11 @@ xkb_config_update_settings (t_xkb_settings *settings)
if (activate_settings && !settings->never_modify_config)
{
ignore_xkl_config_change = TRUE;
- xkl_config_rec_activate (config->config_rec, config->engine);
+ if (!xkl_config_rec_activate (config->config_rec, config->engine))
+ {
+ DBG ("ERROR: can't activate xkl config: [%s]", xkl_get_last_error());
+ // FIXME: we should probably try to reload from xkl config here
+ }
ignore_xkl_config_change = FALSE;
}
More information about the Xfce4-commits
mailing list