Macos-X compatibility change.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23010 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2006-05-31 09:27:21 +00:00
parent aa206849b2
commit f393798b2a
2 changed files with 10 additions and 12 deletions

View file

@ -1,3 +1,11 @@
2006-05-21 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSApplication.m: Implement MacOS-X behavior (as determined
by experimentation) of sending ([performKeyEquivalent:]) to main menu
and to the key window. This differs from the old behavior of sending
to all windows and means that popup/pulldown menus on windows other
than the key window now cannot be activated using key equivalents.
2006-05-30 00:53 Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSDocument.m: Implemented accessory view logic when

View file

@ -1829,19 +1829,9 @@ See -runModalForWindow:
case NSKeyDown:
{
NSArray *window_list = [self windows];
unsigned count = [window_list count];
unsigned i;
NSDebugLLog(@"NSEvent", @"send key down event\n");
for (i = 0; i < count; i++)
{
NSWindow *window = [window_list objectAtIndex: i];
if ([window performKeyEquivalent: theEvent] == YES)
break;
}
if (i == count)
if ([[self mainMenu] performKeyEquivalent: theEvent] == NO
&& [[self keyWindow] performKeyEquivalent: theEvent] == NO)
{
[[theEvent window] sendEvent: theEvent];
}