diff options
author | Huang Peng <shawn.p.huang@gmail.com> | 2008-09-15 11:09:01 +0800 |
---|---|---|
committer | Huang Peng <shawn.p.huang@gmail.com> | 2008-09-15 11:09:01 +0800 |
commit | 38c50d3093978570c9b53284cd8cb56b12a3360d (patch) | |
tree | e0f143667a02bbe5b61d75cf7d75689906b67a14 /client | |
parent | f5c66bd6ac878f3b00c5117eb0e696b351439ee4 (diff) | |
download | ibus-38c50d3093978570c9b53284cd8cb56b12a3360d.tar.gz ibus-38c50d3093978570c9b53284cd8cb56b12a3360d.tar.xz ibus-38c50d3093978570c9b53284cd8cb56b12a3360d.zip |
Does not process key event if context does not have focus.
Diffstat (limited to 'client')
-rw-r--r-- | client/gtk2/ibusimcontext.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c index c97689b..db38e68 100644 --- a/client/gtk2/ibusimcontext.c +++ b/client/gtk2/ibusimcontext.c @@ -306,13 +306,12 @@ ibus_im_context_filter_keypress (GtkIMContext *context, IBusIMContext *ibus = IBUS_IM_CONTEXT (context); IBusIMContextPrivate *priv = ibus->priv; - if (priv->ic) { + if (priv->ic && priv->has_focus) { /* If context does not have focus, ibus will process key event in sync mode. * It is a workaround for increase search in treeview. */ gboolean retval = ibus_im_client_filter_keypress (_client, - priv->ic, event, - priv->has_focus == FALSE); + priv->ic, event, FALSE); if (retval) return TRUE; return gtk_im_context_filter_keypress (priv->slave, event); |