Only allow main menu to become key and try to find another one.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14958 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fedor 2002-11-08 16:39:41 +00:00
parent 7ece160412
commit 57d4133012
5 changed files with 39 additions and 10 deletions

View file

@ -91,10 +91,10 @@ static NSNotificationCenter *nc;
@implementation NSMenuPanel
- (BOOL) canBecomeKeyWindow
{
/* This should be NO, but there's currently a bug in the interaction
with WindowMaker that causes spurious deactivation of the app
if the app icon is the only window that can become key */
return YES;
/* See [NSWindow-_lossOfKeyOrMainWindow] */
if (self == (NSMenuPanel *)[[NSApp mainMenu] window])
return YES;
return NO;
}
@end