From: Peng Huang Date: Fri, 12 Jun 2009 22:10:44 +0000 (+0800) Subject: Do not restore states when focus_in, if the enable is disabled. X-Git-Tag: 1.2.0.20090617~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=95e3cc13377467b00c183a8c21d2f84b3b30d622;p=platform%2Fupstream%2Fibus.git Do not restore states when focus_in, if the enable is disabled. --- diff --git a/bus/inputcontext.c b/bus/inputcontext.c index 08815819..bec08c35 100644 --- a/bus/inputcontext.c +++ b/bus/inputcontext.c @@ -1151,28 +1151,29 @@ bus_input_context_focus_in (BusInputContext *context) if (priv->capabilities & IBUS_CAP_FOCUS) { g_signal_emit (context, context_signals[FOCUS_IN], 0); - - if (priv->preedit_visible && (priv->capabilities & IBUS_CAP_PREEDIT_TEXT) == 0) { - g_signal_emit (context, - context_signals[UPDATE_PREEDIT_TEXT], - 0, - priv->preedit_text, - priv->preedit_cursor_pos, - priv->preedit_visible); - } - if (priv->auxiliary_visible && (priv->capabilities & IBUS_CAP_AUXILIARY_TEXT) == 0) { - g_signal_emit (context, - context_signals[UPDATE_AUXILIARY_TEXT], - 0, - priv->auxiliary_text, - priv->auxiliary_visible); - } - if (priv->auxiliary_visible && (priv->capabilities & IBUS_CAP_LOOKUP_TABLE) == 0) { - g_signal_emit (context, - context_signals[UPDATE_LOOKUP_TABLE], - 0, - priv->lookup_table, - priv->lookup_table_visible); + if (priv->engine && priv->enabled) { + if (priv->preedit_visible && (priv->capabilities & IBUS_CAP_PREEDIT_TEXT) == 0) { + g_signal_emit (context, + context_signals[UPDATE_PREEDIT_TEXT], + 0, + priv->preedit_text, + priv->preedit_cursor_pos, + priv->preedit_visible); + } + if (priv->auxiliary_visible && (priv->capabilities & IBUS_CAP_AUXILIARY_TEXT) == 0) { + g_signal_emit (context, + context_signals[UPDATE_AUXILIARY_TEXT], + 0, + priv->auxiliary_text, + priv->auxiliary_visible); + } + if (priv->lookup_table_visible && (priv->capabilities & IBUS_CAP_LOOKUP_TABLE) == 0) { + g_signal_emit (context, + context_signals[UPDATE_LOOKUP_TABLE], + 0, + priv->lookup_table, + priv->lookup_table_visible); + } } } }