Index: NSMenuView.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/gui/Source/NSMenuView.m,v
retrieving revision 1.82
diff -u -r1.82 NSMenuView.m
--- NSMenuView.m	25 Mar 2003 19:58:19 -0000	1.82
+++ NSMenuView.m	27 Mar 2003 08:26:17 -0000
@@ -470,6 +470,27 @@
     {
       [_titleView removeCloseButton];
     }
+
+  /*
+   * This is really the hack to kill all hacks.
+   *
+   * Ok, so if our title view is lost in another window, say a 
+   * transient window, we make sure to fish it out and bring it
+   * back home.
+   */
+  if ([_titleView window] != _window)
+   {
+     [_titleView removeFromSuperviewWithoutNeedingDisplay];
+     /* We retain here because we released this view when we created it earlier. */
+     RETAIN(_titleView);
+     /* This view needs to be redisplayed ASAP because it will not have the correct
+      * close button state.
+      */
+     [_titleView setNeedsDisplay: YES];
+     [_super_view addSubview: _titleView];
+     /* Ok, we can once again release this back into the wild. */
+     RELEASE(_titleView);
+   }
 }
 
 - (void) setNeedsSizing: (BOOL)flag
