mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
only send events to AtomWindows. Fixes #16.
This commit is contained in:
@@ -9,11 +9,18 @@
|
||||
case NSKeyDown:
|
||||
case NSFlagsChanged:
|
||||
{
|
||||
AtomWindowController *controller = (AtomWindowController *)[[self keyWindow] windowController];
|
||||
BOOL handeled = [controller handleKeyEvent:event];
|
||||
BOOL handeled = NO;
|
||||
id controller = [[self keyWindow] windowController];
|
||||
|
||||
// The keyWindow could be a Cocoa Dialog or something, ignore them.
|
||||
if ([controller isKindOfClass:[AtomWindowController class]]) {
|
||||
handeled = [controller handleKeyEvent:event];
|
||||
}
|
||||
|
||||
if (!handeled) {
|
||||
[super sendEvent:event];
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user