mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +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
|
@ -1,3 +1,11 @@
|
|||
2006-04-28 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSApplication.m: ([-sendEvent:]) try key equivalents for
|
||||
every key down, not just command modifiers ... consistent with
|
||||
MacOS-X and allows carriage return as a button/menu key.
|
||||
* Source/NSWindow.m: ([-performKeyEquivalent:]) only pass on to
|
||||
our views if this is the key window (NSMenu overrides this).
|
||||
|
||||
2006-04-27 Sergii Stoian <stoyan255@yahoo.com>
|
||||
|
||||
* Source/NSMenuView.m (-rectOfItemAtIndex:): Delete origin.x fiddling
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -2538,7 +2538,7 @@ resetCursorRectsForView(NSView *theView)
|
|||
|
||||
- (BOOL) performKeyEquivalent: (NSEvent*)theEvent
|
||||
{
|
||||
if (_contentView)
|
||||
if ([self isKeyWindow] && _contentView)
|
||||
return [_contentView performKeyEquivalent: theEvent];
|
||||
return NO;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue