mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Changes to set the window level of menu windows.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5224 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fd88c789ac
commit
5f059afb86
3 changed files with 22 additions and 13 deletions
|
@ -1,5 +1,14 @@
|
|||
1999-11-17 David Lazaro Saz <khelekir@encomix.es>
|
||||
|
||||
* 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.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue