Index: x11/gdkwindow-x11.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/x11/gdkwindow-x11.c,v
retrieving revision 1.195
diff -u -p -r1.195 gdkwindow-x11.c
--- x11/gdkwindow-x11.c	23 Oct 2003 18:50:40 -0000	1.195
+++ x11/gdkwindow-x11.c	17 Nov 2003 15:58:34 -0000
@@ -984,15 +984,32 @@ update_wm_hints (GdkWindow *window,
   GdkWindowObject *private = (GdkWindowObject *)window;
   GdkDisplay *display = GDK_WINDOW_DISPLAY (window);
   XWMHints wm_hints;
+  XWMHints *old_wm_hints;
 
   if (!force &&
       private->state & GDK_WINDOW_STATE_WITHDRAWN)
     return;
 
   wm_hints.flags = StateHint;
-  wm_hints.input = True;
   wm_hints.initial_state = NormalState;
   
+  old_wm_hints = XGetWMHints (GDK_WINDOW_XDISPLAY (window),
+	                      GDK_WINDOW_XID (window));
+  if (old_wm_hints)
+    {
+      if (old_wm_hints->flags & InputHint)
+        {
+          wm_hints.flags |= InputHint;
+          wm_hints.input = old_wm_hints->input;
+        }
+      else
+        {
+          wm_hints.input = True;
+        }
+
+      XFree (old_wm_hints);
+    }
+
   if (private->state & GDK_WINDOW_STATE_ICONIFIED)
     {
       wm_hints.flags |= StateHint;
