diff options
| author | Huang Peng <shawn.p.huang@gmail.com> | 2008-08-09 11:33:41 +0800 |
|---|---|---|
| committer | Huang Peng <shawn.p.huang@gmail.com> | 2008-08-09 11:33:41 +0800 |
| commit | 8cebcc82b2b20a35da332db29f7ea70f2d5be6dc (patch) | |
| tree | 20907596273345ba26727c82220cc02772de40c8 | |
| parent | a422f497ceae8930405c51221aa6146899c67b8a (diff) | |
| download | ibus-8cebcc82b2b20a35da332db29f7ea70f2d5be6dc.tar.gz ibus-8cebcc82b2b20a35da332db29f7ea70f2d5be6dc.tar.xz ibus-8cebcc82b2b20a35da332db29f7ea70f2d5be6dc.zip | |
Fix cursor position problem
| -rw-r--r-- | gtk2/ibusimcontext.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/gtk2/ibusimcontext.c b/gtk2/ibusimcontext.c index d1a062d..8a3c484 100644 --- a/gtk2/ibusimcontext.c +++ b/gtk2/ibusimcontext.c @@ -334,19 +334,16 @@ ibus_im_context_set_cursor_location (GtkIMContext *context, GdkRectangle *area) IBusIMContext *ibus = IBUS_IM_CONTEXT (context); IBusIMContextPrivate *priv = ibus->priv; + gint x, y; priv->cursor_area = *area; - if (priv->enable) { - /* It is the focused context */ - gint x, y; - if(priv->client_window) { - gdk_window_get_origin (priv->client_window, &x, &y); - area->x += x; - area->y += y; - } - ibus_im_client_set_cursor_location (_client, ibus, area); + if(priv->client_window) { + gdk_window_get_origin (priv->client_window, &x, &y); + area->x += x; + area->y += y; } + ibus_im_client_set_cursor_location (_client, ibus, area); gtk_im_context_set_cursor_location (priv->slave, area); } |
