Turn events back on!

This commit is contained in:
Corey Johnson
2011-11-04 18:07:02 -07:00
parent 750ede4f2c
commit 2eb019c5a6

View File

@@ -63,23 +63,23 @@
}
// Overridden
//- (void)sendEvent:(NSEvent *)event {
// if ([event type] == NSKeyDown) {
// BOOL handeled = NO;
// AtomController *controller = [[self keyWindow] windowController];
//
// // The keyWindow could be a Cocoa Dialog or something, ignore that.
// if ([controller isKindOfClass:[AtomController class]]) {
// JSValueRef value = [controller.jscocoa callJSFunctionNamed:@"handleKeyEvent" withArguments:event, nil];
// handeled = [controller.jscocoa toBool:value];
// }
//
// if (!handeled) [super sendEvent:event];
// }
// else {
// [super sendEvent:event];
// }
//}
- (void)sendEvent:(NSEvent *)event {
if ([event type] == NSKeyDown) {
BOOL handeled = NO;
AtomController *controller = [[self keyWindow] windowController];
// The keyWindow could be a Cocoa Dialog or something, ignore that.
if ([controller isKindOfClass:[AtomController class]]) {
JSValueRef value = [controller.jscocoa callJSFunctionNamed:@"handleKeyEvent" withArguments:event, nil];
handeled = [controller.jscocoa toBool:value];
}
if (!handeled) [super sendEvent:event];
}
else {
[super sendEvent:event];
}
}
// AppDelegate
- (void)applicationWillFinishLaunching:(NSNotification *)aNotification {