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)setShell:(atom::NativeWindowMac*)shell;
- (void)setEnableLargerThanScreen:(bool)enable; - (void)setEnableLargerThanScreen:(bool)enable;
- (BOOL)redispatchKeyEvent:(NSEvent*)event; - (void)redispatchKeyEvent:(NSEvent*)event;
- (BOOL)performKeyEquivalent:(NSEvent*)theEvent; - (BOOL)performKeyEquivalent:(NSEvent*)theEvent;
@end @end

View file

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