Remove unused variable

This commit is contained in:
Kevin Sawicki 2016-06-15 14:31:15 -07:00
parent a2bbfea9e0
commit 1762599df0
2 changed files with 5 additions and 13 deletions

View file

@ -165,7 +165,7 @@ class NativeWindowMac : public NativeWindow {
- (void)setShell:(atom::NativeWindowMac*)shell;
- (void)setEnableLargerThanScreen:(bool)enable;
- (BOOL)redispatchKeyEvent:(NSEvent*)event;
- (void)redispatchKeyEvent:(NSEvent*)event;
- (BOOL)performKeyEquivalent:(NSEvent*)theEvent;
@end

View file

@ -337,34 +337,26 @@ bool ScopedDisableResize::disable_resize_ = false;
- (void)sendEvent:(NSEvent*)event {
if (!redispatchingEvent_)
[super sendEvent:event];
else
eventHandled_ = NO;
}
- (BOOL)performKeyEquivalent:(NSEvent*)event {
if (redispatchingEvent_)
return NO;
if ([super performKeyEquivalent:event])
return YES;
return NO;
else
return [super performKeyEquivalent:event];
}
- (BOOL)redispatchKeyEvent:(NSEvent*)event {
- (void)redispatchKeyEvent:(NSEvent*)event {
NSEventType eventType = [event type];
if (eventType != NSKeyDown && eventType != NSKeyUp &&
eventType != NSFlagsChanged) {
return YES;
return;
}
// Redispatch the event.
eventHandled_ = YES;
redispatchingEvent_ = YES;
[NSApp sendEvent:event];
redispatchingEvent_ = NO;
return eventHandled_;
}
@end