transplate x, y, if client window is not NULL.
authorHuang Peng <shawn.p.huang@gmail.com>
Thu, 15 May 2008 03:19:26 +0000 (11:19 +0800)
committerHuang Peng <shawn.p.huang@gmail.com>
Thu, 15 May 2008 03:19:26 +0000 (11:19 +0800)
gtk2/gikimcontext.c

index 5cce476..43614b0 100644 (file)
@@ -300,9 +300,11 @@ gik_im_context_set_cursor_location (GtkIMContext *context, GdkRectangle *area)
     if (context == CURRENT_CONTEXT && gik_im_client_is_enabled (priv->client)) {
         /* It is the focused context */
         gint x, y;
-        gdk_window_get_origin (priv->client_window, &x, &y);
-        area->x += x;
-        area->y += y;
+        if(priv->client_window) {
+            gdk_window_get_origin (priv->client_window, &x, &y);
+            area->x += x;
+            area->y += y;
+        }
         gik_im_client_set_cursor_location (priv->client, area);
     }
     gtk_im_context_set_cursor_location (priv->slave, area);