summaryrefslogtreecommitdiff
path: root/redo/uitask_darwin.m
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-21 10:19:08 -0400
committerPietro Gagliardi <[email protected]>2014-08-21 10:19:08 -0400
commitc9f8955758545c08bb8b58bab094e5fd4ff3562b (patch)
treefc7ec806751e31fde0fd74606a7d52ee33321e09 /redo/uitask_darwin.m
parentd53dba9e3861d4ca0ea900b24de88665a8125d14 (diff)
Implemented the new AreaHandler.Key() on Mac OS X.
Diffstat (limited to 'redo/uitask_darwin.m')
-rw-r--r--redo/uitask_darwin.m18
1 files changed, 9 insertions, 9 deletions
diff --git a/redo/uitask_darwin.m b/redo/uitask_darwin.m
index 86de4ce..4a2173f 100644
--- a/redo/uitask_darwin.m
+++ b/redo/uitask_darwin.m
@@ -20,6 +20,7 @@ static Class areaClass;
- (void)sendEvent:(NSEvent *)e
{
NSEventType type;
+ BOOL handled = NO;
type = [e type];
if (type == NSKeyDown || type == NSKeyUp || type == NSFlagsChanged) {
@@ -29,19 +30,18 @@ static Class areaClass;
if (focused != nil && [focused isKindOfClass:areaClass])
switch (type) {
case NSKeyDown:
- [focused keyDown:e];
- return;
+ handled = [focused doKeyDown:e];
+ break;
case NSKeyUp:
- [focused keyUp:e];
- return;
+ handled = [focused doKeyUp:e];
+ break;
case NSFlagsChanged:
- [focused flagsChanged:e];
- return;
+ handled = [focused doFlagsChanged:e];
+ break;
}
- // else fall through
}
- // otherwise, let NSApplication do it
- [super sendEvent:e];
+ if (!handled)
+ [super sendEvent:e];
}
// ok AppKit, wanna play hardball? let's play hardball.