diff --git a/ChangeLog b/ChangeLog index 289247bb3..185db51c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 1999-11-17 David Lazaro Saz + * Source/NSApplication.m ([NSApplication -setMainMenu:]): The window + level for the main menu is set here to NSMainMenuWindowLevel. The old + main menu window level is reverted to NSSubmenuWindowLevel. + + * Source/NSMenu.m ([NSMenu -initWithTitle:]): Changed init code to take + into account changes made in the NSMenuWindow class. + ([NSMenuWindow -init]): This is the main init method for this class. + It is responsible of setting the window level to NSSubmenuWindowLevel. + * Model/GMAppKit.m (NSMenu, NSMenuItem): Added preliminary changes to support new menuing code. diff --git a/Source/NSApplication.m b/Source/NSApplication.m index 9c435fc83..112e3eebe 100644 --- a/Source/NSApplication.m +++ b/Source/NSApplication.m @@ -1302,11 +1302,13 @@ NSAssert([event retainCount] > 0, NSInternalInconsistencyException); if (main_menu != nil && main_menu != aMenu) { [main_menu close]; + [[main_menu window] setLevel: NSSubmenuWindowLevel]; } ASSIGN(main_menu, aMenu); [main_menu setTitle: [[NSProcessInfo processInfo] processName]]; + [[main_menu window] setLevel: NSMainMenuWindowLevel]; [main_menu sizeToFit]; /* * Find a menucell with the title Windows this is the default windows menu diff --git a/Source/NSMenu.m b/Source/NSMenu.m index 8a1c69e97..281e89039 100644 --- a/Source/NSMenu.m +++ b/Source/NSMenu.m @@ -175,15 +175,9 @@ static NSString* NSMenuLocationsKey = @"NSMenuLocations"; _oldAttachedMenu = nil; // Create the windows that will display the menu. - aWindow = [[NSMenuWindow alloc] initWithContentRect: winRect - styleMask: NSBorderlessWindowMask - backing: NSBackingStoreRetained - defer: NO]; - bWindow = [[NSMenuWindow alloc] initWithContentRect: winRect - styleMask: NSBorderlessWindowMask - backing: NSBackingStoreRetained - defer: NO]; - + aWindow = [[NSMenuWindow alloc] init]; + bWindow = [[NSMenuWindow alloc] init]; + titleView = [NSMenuWindowTitleView new]; [titleView setFrameOrigin: NSMakePoint(0, winRect.size.height - 23)]; [titleView setFrameSize: NSMakeSize (winRect.size.width, 23)]; @@ -1230,10 +1224,14 @@ static NSString* NSMenuLocationsKey = @"NSMenuLocations"; - (id) init { - return [self initWithContentRect: NSZeroRect - styleMask: NSBorderlessWindowMask - backing: NSBackingStoreBuffered - defer: NO]; + [self initWithContentRect: NSZeroRect + styleMask: NSBorderlessWindowMask + backing: NSBackingStoreBuffered + defer: NO]; + + window_level = NSSubmenuWindowLevel; + + return self; } - (BOOL) canBecomeMainWindow