Index: GSWindowDecorationView.m
===================================================================
--- GSWindowDecorationView.m	(revision 29275)
+++ GSWindowDecorationView.m	(working copy)
@@ -32,6 +32,7 @@
 #include "AppKit/NSColor.h"
 #include "AppKit/NSMenuView.h"
 #include "AppKit/NSWindow.h"
+#include "AppKit/NSApplication.h"
 #include "GNUstepGUI/GSDisplayServer.h"
 #include "GNUstepGUI/GSTheme.h"
 
@@ -231,7 +232,7 @@
       NSMenuView *menuView;
       float menuBarHeight = [NSMenuView menuBarHeight];
 
-      menuView = [[_window menu] menuRepresentation];
+      menuView = [self findMenuView];
       [menuView setFrame: NSMakeRect(
               contentViewFrame.origin.x,
               NSMaxY(contentViewFrame) - menuBarHeight, 
@@ -431,7 +432,9 @@
 - (void) addMenuView: (NSMenuView*)menuView
 {
   float	menubarHeight = [NSMenuView menuBarHeight];
-  
+ 
+  NSAssert(hasMenu == NO, @"Already registered menu view.");
+
   hasMenu = YES;
   // Plug the menu view
   [menuView setFrame: NSMakeRect(
@@ -468,6 +471,32 @@
   return nil;
 }
 
+/**
+  * Locate the menu view and returns it.
+  */
+- (NSMenuView*) findMenuView
+{
+  NSEnumerator	*e;
+  NSView	*v;
+
+  if (hasMenu == NO)
+    return nil;
+
+  e = [[self subviews] objectEnumerator];
+
+  while ((v = [e nextObject]) != nil)
+    {
+      if ([v isKindOfClass: [NSMenuView class]] == YES)
+	{
+          return (NSMenuView*)v;
+	}
+    }
+
+  [NSException raise:NSInternalInconsistencyException
+    format:@"Unable to find NSMenuView object although hasMenu == YES"];
+  return nil;
+}
+
 @end
 
 
Index: NSMenu.m
===================================================================
--- NSMenu.m	(revision 29275)
+++ NSMenu.m	(working copy)
@@ -149,6 +149,11 @@
   return NO;
 }
 
+- (BOOL) canShowMenuBar
+{
+  return NO;
+}
+
 - (void) orderFrontRegardless
 {
   NSInterfaceStyle style = NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", nil);
@@ -644,7 +649,7 @@
 
   /* Set up the notification to start the process of redisplaying
      the menus where the user left them the last time.  
-     
+    
      Use NSApplicationDidFinishLaunching, and not
      NSApplicationWillFinishLaunching, so that the programmer can set
      up menus in NSApplicationWillFinishLaunching.
@@ -1058,10 +1063,6 @@
 	          [self setMain: YES];
 		}
 	    }
-	  else if ([w menu] != self)
-	    {
-	      [w setMenu: self];
-	    }
 	}
     }
   if (_delegate)
@@ -1751,7 +1752,7 @@
   [_aWindow orderFrontRegardless];
 }
 
-- (void) displayTransient
+- (void) displayTransientWithSuperView:(id)superRep
 {
   NSPoint location;
   NSView *contentView;
@@ -1774,11 +1775,11 @@
    * Cache the old submenu if any and query the supermenu our position.
    * Otherwise, raise menu under the mouse.
    */
-  if (_superMenu != nil)
+  if (superRep != nil)
     {
       _oldAttachedMenu = _superMenu->_attachedMenu;
       _superMenu->_attachedMenu = self;
-      location = [_superMenu locationForSubmenu: self];
+      location = [superRep locationForSubmenu: self];
     }
   else
     {
@@ -1804,6 +1805,11 @@
   [_bWindow orderFront: self];
 }
 
+- (void) displayTransient
+{
+  [self displayTransientWithSuperView:[_superMenu menuRepresentation]];
+}
+
 - (void) close
 {
   NSMenu *sub = [self attachedMenu];
@@ -1908,15 +1914,33 @@
           RELEASE(newRep);
           if (newStyle == NSWindows95InterfaceStyle)
             {
-              /* Put menu in the main window for microsoft style.
-               */
-              [[NSApp mainWindow] setMenu: self];
+             // Make all windows that can show the menu bar contain
+             // this menu.
+             NSEnumerator* windowEnum =
+               [[[NSApplication sharedApplication] windows]
+                objectEnumerator];
+             NSWindow* current = [windowEnum nextObject];
+             while (current != nil)
+              {
+                if ([current canShowMenuBar] == YES)
+                  [current setMenu:self];
+                current = [windowEnum nextObject];
+              }
             }
           else if ([[NSApp mainWindow] menu] == self)
             {
-              /* Remove the menu from the main window.
-               */
-              [[NSApp mainWindow] setMenu: nil];
+               // Make all windows that can show the menu bar remove
+               // this menu.
+               NSEnumerator* windowEnum =
+                 [[[NSApplication sharedApplication] windows]
+                  objectEnumerator];
+               NSWindow* current = [windowEnum nextObject];
+               while (current != nil)
+                {
+                  if ([current canShowMenuBar] == YES)
+                    [current setMenu:nil];
+                  current = [windowEnum nextObject];
+                }
             }
         }
       
Index: NSWindow.m
===================================================================
--- NSWindow.m	(revision 29275)
+++ NSWindow.m	(working copy)
@@ -364,6 +364,11 @@
   return NO;
 }
 
+- (BOOL) canShowMenuBar
+{
+  return NO;
+}
+
 - (void) _initDefaults
 {
   [super _initDefaults];
@@ -1727,6 +1732,11 @@
        */
       [isa _addAutodisplayedWindow: self];
 
+      if ([self canShowMenuBar] && [self menu] == nil)
+        [self setMenu:[[NSApplication sharedApplication] mainMenu]];
+      else if ([self canShowMenuBar] == NO && [self menu] != nil)
+        [self setMenu:nil];
+
       if (_f.has_closed == YES)
         {
           _f.has_closed = NO;        /* A closed window has re-opened        */
@@ -1799,12 +1809,6 @@
         {
           [_wv setInputState: GSTitleBarNormal];
         }
-      if ([self menu] == [NSApp mainMenu])
-	{
-	  /* This window contains the main menu ... remove it.
-	   */
-	  [self setMenu: nil];
-	}
       [nc postNotificationName: NSWindowDidResignMainNotification object: self];
     }
 }
@@ -5251,6 +5255,18 @@
 
 @end
 
+@implementation NSWindow (GNUstepExtra)
+
+- (BOOL) canShowMenuBar
+{
+  if ((NSResizableWindowMask | NSTitledWindowMask) & _styleMask)
+    return YES;
+  else
+    return NO;
+}
+
+@end
+
 @implementation NSWindow (Toolbar)
 
 - (void) runToolbarCustomizationPalette: (id)sender
Index: GSThemeMenu.m
===================================================================
--- GSThemeMenu.m	(revision 29275)
+++ GSThemeMenu.m	(working copy)
@@ -55,26 +55,16 @@
     {
       NSMenuView *menuView;
       
-      /* Restore the old representation to its original menu after
-       * removing it from the window.  If we didn't do this, the menu
-       * representation would be left without a partent view or
-       * window to draw in.
-       */
-      menuView = [wv removeMenuView];
-      [[window menu] setMenuRepresentation: menuView];
-      [menuView sizeToFit];
-      
-      /* Set the new menu, and transfer the new menu representation
-       * to the window decoration view.
-       */
+      [wv removeMenuView];
       menuView = [menu menuRepresentation];
       if (menuView != nil)
-	{
-	  [menu close];
-	  [menuView setHorizontal: YES];
-	  [menuView sizeToFit];
-	  [wv addMenuView: menuView];
-	}
+        {
+          menuView = [[NSMenuView alloc] initWithFrame: NSZeroRect];
+          [menuView setMenu: menu];
+          [menuView setHorizontal: YES];
+          [menuView sizeToFit];
+          [wv addMenuView: menuView];
+        }
     }
 }
 
Index: NSMenuView.m
===================================================================
--- NSMenuView.m	(revision 29275)
+++ NSMenuView.m	(working copy)
@@ -236,7 +236,7 @@
       [theCenter removeObserver: self  name: nil  object: _attachedMenu];
     }
 
-  /* menu is retaining us, so we should not be retaining menu.  */
+  /* menu or window view is retaining us, so we should not be retaining menu.  */
   _attachedMenu = menu;
   _items_link = [_attachedMenu itemArray];
 
@@ -552,10 +552,11 @@
   
   attachableMenu = [[_items_link objectAtIndex: index] submenu];
 
-  if ([attachableMenu isTornOff] || [_attachedMenu isTransient])
+  if ([attachableMenu isTornOff] || [_attachedMenu isTransient] 
+     || ([_attachedMenu supermenu] == nil && NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", nil)==NSWindows95InterfaceStyle) )
     {
       NSDebugLLog (@"NSMenu",  @"Will open transient: %@", attachableMenu);
-      [attachableMenu displayTransient];
+      [attachableMenu displayTransientWithSuperView:self];
       [[attachableMenu menuRepresentation] setHighlightedItemIndex: -1]; 
     }
   else
@@ -977,7 +978,7 @@
   if (_needsSizing)
     [self sizeToFit];
 
-  if (aSubmenu)
+  if (aSubmenu != nil)
     submenuFrame = [[[aSubmenu menuRepresentation] window] frame];
   else
     submenuFrame = NSZeroRect;
Index: NSToolbarFrameworkPrivate.h
===================================================================
--- NSToolbarFrameworkPrivate.h	(revision 29275)
+++ NSToolbarFrameworkPrivate.h	(working copy)
@@ -122,6 +122,7 @@
 @interface GSWindowDecorationView (Menu)
 - (void) addMenuView: (NSMenuView*)menuView;
 - (NSMenuView*) removeMenuView;
+- (NSMenuView*) findMenuView;
 @end
 
 #endif // _NSToolbarFrameworkPrivate_h_INCLUDE
