From 38c50d3093978570c9b53284cd8cb56b12a3360d Mon Sep 17 00:00:00 2001 From: Huang Peng Date: Mon, 15 Sep 2008 11:09:01 +0800 Subject: Does not process key event if context does not have focus. --- client/gtk2/ibusimcontext.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'client') 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); -- cgit