mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 11:00:59 +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
81f314c55c
commit
34d679ec1d
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>
|
2006-04-27 Sergii Stoian <stoyan255@yahoo.com>
|
||||||
|
|
||||||
* Source/NSMenuView.m (-rectOfItemAtIndex:): Delete origin.x fiddling
|
* Source/NSMenuView.m (-rectOfItemAtIndex:): Delete origin.x fiddling
|
||||||
|
|
|
@ -1825,23 +1825,22 @@ See -runModalForWindow:
|
||||||
|
|
||||||
case NSKeyDown:
|
case NSKeyDown:
|
||||||
{
|
{
|
||||||
|
NSArray *window_list = [self windows];
|
||||||
|
unsigned count = [window_list count];
|
||||||
|
unsigned i;
|
||||||
|
|
||||||
NSDebugLLog(@"NSEvent", @"send key down event\n");
|
NSDebugLLog(@"NSEvent", @"send key down event\n");
|
||||||
if ([theEvent modifierFlags] & NSCommandKeyMask)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
NSArray *window_list = [self windows];
|
NSWindow *window = [window_list objectAtIndex: i];
|
||||||
unsigned i;
|
|
||||||
unsigned count = [window_list count];
|
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
if ([window performKeyEquivalent: theEvent] == YES)
|
||||||
{
|
break;
|
||||||
NSWindow *window = [window_list objectAtIndex: i];
|
}
|
||||||
|
if (i == count)
|
||||||
if ([window performKeyEquivalent: theEvent] == YES)
|
{
|
||||||
break;
|
[[theEvent window] sendEvent: theEvent];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
[[theEvent window] sendEvent: theEvent];
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2538,7 +2538,7 @@ resetCursorRectsForView(NSView *theView)
|
||||||
|
|
||||||
- (BOOL) performKeyEquivalent: (NSEvent*)theEvent
|
- (BOOL) performKeyEquivalent: (NSEvent*)theEvent
|
||||||
{
|
{
|
||||||
if (_contentView)
|
if ([self isKeyWindow] && _contentView)
|
||||||
return [_contentView performKeyEquivalent: theEvent];
|
return [_contentView performKeyEquivalent: theEvent];
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue