1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
From 4f9c7b401e948756fbe76a56a7619052f8acae42 Mon Sep 17 00:00:00 2001
From: Sergey V. Udaltsov <svu@gnome.org>
Date: Tue, 04 May 2010 23:36:04 +0000
Subject: Do not crash on kbd plug in
There is funny race condition in X - when _XKB_RULES_NAMES is already
loaded from sysconfig while actual XKB config is still not changed (from
user config). This commit should fix
https://bugzilla.gnome.org/show_bug.cgi?id=617643
---
diff --git a/libgnomekbd/gkbd-indicator.c b/libgnomekbd/gkbd-indicator.c
index 5def369..f6064fa 100644
--- a/libgnomekbd/gkbd-indicator.c
+++ b/libgnomekbd/gkbd-indicator.c
@@ -318,7 +318,7 @@ gkbd_indicator_extract_layout_name (int group, XklEngine * engine,
gchar ** short_group_names,
gchar ** full_group_names)
{
- char *layout_name;
+ char *layout_name = NULL;
if (group < g_strv_length (short_group_names)) {
if (xkl_engine_get_features (engine) &
XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
@@ -352,7 +352,7 @@ gkbd_indicator_extract_layout_name (int group, XklEngine * engine,
}
if (layout_name == NULL)
- layout_name = g_strdup ("??");
+ layout_name = g_strdup ("");
return layout_name;
}
diff --git a/libgnomekbd/gkbd-status.c b/libgnomekbd/gkbd-status.c
index 90731af..efcad6a 100644
--- a/libgnomekbd/gkbd-status.c
+++ b/libgnomekbd/gkbd-status.c
@@ -152,6 +152,7 @@ gkbd_status_render_cairo (cairo_t * cr, int group)
cairo_font_options_t *fo;
static GHashTable *ln2cnt_map = NULL;
+ xkl_debug (160, "Rendering cairo for group %d\n", group);
if (globals.ind_cfg.background_color != NULL &&
globals.ind_cfg.background_color[0] != 0) {
if (sscanf
--
cgit v0.8.3.1
|