Author: manolo
Date: 2013-01-18 08:34:58 -0800 (Fri, 18 Jan 2013)
New Revision: 9800
Log:
Simplification of the - (BOOL)[FLView performKeyEquivalent:(NSEvent*)theEvent]
method.
Modified:
branches/branch-1.3/src/Fl_cocoa.mm
Modified: branches/branch-1.3/src/Fl_cocoa.mm
===================================================================
--- branches/branch-1.3/src/Fl_cocoa.mm 2013-01-17 17:40:53 UTC (rev 9799)
+++ branches/branch-1.3/src/Fl_cocoa.mm 2013-01-18 16:34:58 UTC (rev 9800)
@@ -1795,13 +1795,12 @@
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
{
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit