diff options
author | Huang Peng <shawn.p.huang@gmail.com> | 2009-02-15 14:51:41 +0800 |
---|---|---|
committer | Huang Peng <shawn.p.huang@gmail.com> | 2009-02-15 14:51:41 +0800 |
commit | 06c4f228a3176b88947523bf635d49e0fee9b978 (patch) | |
tree | 719f05cb5565e57d7c1bc1d6463f7f6f340eab05 | |
parent | be18567eac632c9fd6ef6ff14576d43b02f67d17 (diff) | |
download | ibus-06c4f228a3176b88947523bf635d49e0fee9b978.tar.gz ibus-06c4f228a3176b88947523bf635d49e0fee9b978.tar.xz ibus-06c4f228a3176b88947523bf635d49e0fee9b978.zip |
Not call FocusIn & FocusOut methods of engines, if input context is disabled.
-rw-r--r-- | bus/inputcontext.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bus/inputcontext.c b/bus/inputcontext.c index 4bef950..bdc7d75 100644 --- a/bus/inputcontext.c +++ b/bus/inputcontext.c @@ -1010,7 +1010,7 @@ bus_input_context_focus_in (BusInputContext *context) priv->has_focus = TRUE; - if (priv->engine) { + if (priv->engine && priv->enabled) { bus_engine_proxy_focus_in (priv->engine); } @@ -1032,7 +1032,7 @@ bus_input_context_focus_out (BusInputContext *context) priv->has_focus = FALSE; - if (priv->engine) { + if (priv->engine && priv->enabled) { bus_engine_proxy_focus_out (priv->engine); } @@ -1389,7 +1389,6 @@ bus_input_context_disable (BusInputContext *context) BusInputContextPrivate *priv; priv = BUS_INPUT_CONTEXT_GET_PRIVATE (context); - priv->enabled = FALSE; if (priv->engine) { if (priv->has_focus) { @@ -1404,6 +1403,8 @@ bus_input_context_disable (BusInputContext *context) g_signal_emit (context, context_signals[DISABLED], 0); + + priv->enabled = FALSE; } const static struct { |