mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 22:40:38 +00:00
Minor key equivalent handling improvement.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22834 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
95a6ff2dfe
commit
f5afe5e93e
3 changed files with 21 additions and 14 deletions
|
@ -1825,23 +1825,22 @@ See -runModalForWindow:
|
|||
|
||||
case NSKeyDown:
|
||||
{
|
||||
NSArray *window_list = [self windows];
|
||||
unsigned count = [window_list count];
|
||||
unsigned i;
|
||||
|
||||
NSDebugLLog(@"NSEvent", @"send key down event\n");
|
||||
if ([theEvent modifierFlags] & NSCommandKeyMask)
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
NSArray *window_list = [self windows];
|
||||
unsigned i;
|
||||
unsigned count = [window_list count];
|
||||
NSWindow *window = [window_list objectAtIndex: i];
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
NSWindow *window = [window_list objectAtIndex: i];
|
||||
|
||||
if ([window performKeyEquivalent: theEvent] == YES)
|
||||
break;
|
||||
}
|
||||
if ([window performKeyEquivalent: theEvent] == YES)
|
||||
break;
|
||||
}
|
||||
if (i == count)
|
||||
{
|
||||
[[theEvent window] sendEvent: theEvent];
|
||||
}
|
||||
else
|
||||
[[theEvent window] sendEvent: theEvent];
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue