mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:00:48 +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
5c33261e75
commit
d873ec88a7
3 changed files with 22 additions and 13 deletions
|
@ -1,5 +1,14 @@
|
||||||
1999-11-17 David Lazaro Saz <khelekir@encomix.es>
|
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
|
* Model/GMAppKit.m (NSMenu, NSMenuItem): Added preliminary changes to
|
||||||
support new menuing code.
|
support new menuing code.
|
||||||
|
|
||||||
|
|
|
@ -1302,11 +1302,13 @@ NSAssert([event retainCount] > 0, NSInternalInconsistencyException);
|
||||||
if (main_menu != nil && main_menu != aMenu)
|
if (main_menu != nil && main_menu != aMenu)
|
||||||
{
|
{
|
||||||
[main_menu close];
|
[main_menu close];
|
||||||
|
[[main_menu window] setLevel: NSSubmenuWindowLevel];
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIGN(main_menu, aMenu);
|
ASSIGN(main_menu, aMenu);
|
||||||
|
|
||||||
[main_menu setTitle: [[NSProcessInfo processInfo] processName]];
|
[main_menu setTitle: [[NSProcessInfo processInfo] processName]];
|
||||||
|
[[main_menu window] setLevel: NSMainMenuWindowLevel];
|
||||||
[main_menu sizeToFit];
|
[main_menu sizeToFit];
|
||||||
/*
|
/*
|
||||||
* Find a menucell with the title Windows this is the default windows menu
|
* Find a menucell with the title Windows this is the default windows menu
|
||||||
|
|
|
@ -175,15 +175,9 @@ static NSString* NSMenuLocationsKey = @"NSMenuLocations";
|
||||||
_oldAttachedMenu = nil;
|
_oldAttachedMenu = nil;
|
||||||
|
|
||||||
// Create the windows that will display the menu.
|
// Create the windows that will display the menu.
|
||||||
aWindow = [[NSMenuWindow alloc] initWithContentRect: winRect
|
aWindow = [[NSMenuWindow alloc] init];
|
||||||
styleMask: NSBorderlessWindowMask
|
bWindow = [[NSMenuWindow alloc] init];
|
||||||
backing: NSBackingStoreRetained
|
|
||||||
defer: NO];
|
|
||||||
bWindow = [[NSMenuWindow alloc] initWithContentRect: winRect
|
|
||||||
styleMask: NSBorderlessWindowMask
|
|
||||||
backing: NSBackingStoreRetained
|
|
||||||
defer: NO];
|
|
||||||
|
|
||||||
titleView = [NSMenuWindowTitleView new];
|
titleView = [NSMenuWindowTitleView new];
|
||||||
[titleView setFrameOrigin: NSMakePoint(0, winRect.size.height - 23)];
|
[titleView setFrameOrigin: NSMakePoint(0, winRect.size.height - 23)];
|
||||||
[titleView setFrameSize: NSMakeSize (winRect.size.width, 23)];
|
[titleView setFrameSize: NSMakeSize (winRect.size.width, 23)];
|
||||||
|
@ -1230,10 +1224,14 @@ static NSString* NSMenuLocationsKey = @"NSMenuLocations";
|
||||||
|
|
||||||
- (id) init
|
- (id) init
|
||||||
{
|
{
|
||||||
return [self initWithContentRect: NSZeroRect
|
[self initWithContentRect: NSZeroRect
|
||||||
styleMask: NSBorderlessWindowMask
|
styleMask: NSBorderlessWindowMask
|
||||||
backing: NSBackingStoreBuffered
|
backing: NSBackingStoreBuffered
|
||||||
defer: NO];
|
defer: NO];
|
||||||
|
|
||||||
|
window_level = NSSubmenuWindowLevel;
|
||||||
|
|
||||||
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) canBecomeMainWindow
|
- (BOOL) canBecomeMainWindow
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue