diff options
| author | Manolo Gouy <Manolo> | 2013-01-18 16:34:58 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2013-01-18 16:34:58 +0000 |
| commit | a0ef82b7dc139fc718024ef47535e2c4a214acfa (patch) | |
| tree | e1794d9e288f15c8c3dac9e83bd6554056e2f984 | |
| parent | 81da29ff1297e9fd4c24ee9b0d226823930c68c6 (diff) | |
Simplification of the - (BOOL)[FLView performKeyEquivalent:(NSEvent*)theEvent] method.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9800 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/Fl_cocoa.mm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 4d11f7903..609d7b417 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1795,13 +1795,12 @@ static void cocoaKeyboardHandler(NSEvent *theEvent) fl_lock_function(); cocoaKeyboardHandler(theEvent); in_key_event = YES; - NSUInteger mods = [theEvent modifierFlags]; - BOOL handled = YES; - if ( (mods & NSAlternateKeyMask) && (mods & NSCommandKeyMask) ) [self doCommandBySelector:NULL]; - else handled = [[self performSelector:inputContextSEL] handleEvent:theEvent]; + if (! [[self performSelector:inputContextSEL] handleEvent:theEvent] ) { + [self doCommandBySelector:@selector(noop:)]; + } in_key_event = NO; fl_unlock_function(); - return handled; + return YES; } - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent { |
