--- gtk+-2.2.2/modules/input/gtkimcontextxim.c	2003-06-30 19:04:54.000000000 +0800
+++ gtk+-2.2.2/modules/input/gtkimcontextxim.c.new	2003-06-30 19:21:05.000000000 +0800
@@ -531,7 +531,6 @@
 gtk_im_context_track_client_window (GtkWidget *widget,
 				    GtkWidget *old_toplevel)
 {
-  GtkWidget *toplevel;  
   GSList *tmp_list;
   StatusWindow *status_window;
   GtkIMContextXIM *context_xim;
@@ -1332,9 +1331,10 @@
 {
   GdkRectangle rect;
   GtkRequisition requisition;
+  GdkScreen *screen = gtk_widget_get_screen (toplevel);
   gint y;
-  gint height = gdk_screen_get_height (gtk_widget_get_screen (toplevel));
-  
+  gint height = gdk_screen_get_height (screen);
+
   gdk_window_get_frame_extents (toplevel->window, &rect);
   gtk_widget_size_request (status_window->window, &requisition);
 
@@ -1342,7 +1342,8 @@
     y = rect.y + rect.height;
   else
     y = height - requisition.height;
-  
+
+  gtk_window_set_screen (GTK_WINDOW (status_window->window), screen);
   gtk_window_move (GTK_WINDOW (status_window->window), rect.x, y);
 
   return FALSE;
