summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey V. Udaltsov <svu@gnome.org>2011-10-26 18:52:57 +0100
committerSergey V. Udaltsov <svu@gnome.org>2011-10-26 18:52:57 +0100
commit3d12615671ae69b718d23e5eeeed4164eeeb4582 (patch)
treeb0704d42f49ece87ad68f93faff2a208c6f06c2b
parent18e75ba865e5f23b5e0b6926cc20ee82b0782084 (diff)
downloadlibxklavier-3d12615671ae69b718d23e5eeeed4164eeeb4582.tar.gz
Fixing handling default group when l-p-w is turned off
Patch by halfline@gnome.org
-rw-r--r--libxklavier/xklavier.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libxklavier/xklavier.c b/libxklavier/xklavier.c
index 463be27..7c4f6c1 100644
--- a/libxklavier/xklavier.c
+++ b/libxklavier/xklavier.c
@@ -377,6 +377,10 @@ xkl_engine_load_window_tree(XklEngine * engine)
curr_toplvl_win));
if (have_toplevel_win) {
+ XklState old_state;
+
+ old_state = xkl_engine_priv (engine, curr_state);
+
gboolean have_state =
xkl_engine_get_toplevel_window_state(engine,
xkl_engine_priv
@@ -399,6 +403,11 @@ xkl_engine_load_window_tree(XklEngine * engine)
(have_state ?
xkl_engine_priv(engine,
curr_state).indicators : -1));
+
+ if (old_state.group != xkl_engine_priv (engine, curr_state).group) {
+ xkl_engine_lock_group (engine, xkl_engine_priv (engine, curr_state).group);
+ }
+
} else {
xkl_debug(160,
"Could not find initial app. "