Check event.window when forward events.
authorHuang Peng <shawn.p.huang@gmail.com>
Sun, 17 Aug 2008 04:00:24 +0000 (12:00 +0800)
committerHuang Peng <shawn.p.huang@gmail.com>
Sun, 17 Aug 2008 04:00:24 +0000 (12:00 +0800)
client/gtk2/ibusimcontext.c

index c48e45d..617e407 100644 (file)
@@ -475,7 +475,13 @@ _client_forward_event_cb (IBusIMClient *client, const gchar *ic, GdkEvent *event
         g_get_current_time (&time);
         event->key.time = time.tv_sec * 1000 + time.tv_usec / 1000;
     }
-    gdk_event_put (event);
+    if (event->any.window == NULL) {
+        event->any.window = context->priv->client_window;
+        gdk_event_put (event);
+        event->any.window = NULL;
+    }
+    else
+        gdk_event_put (event);
 }
 
 static void