From 1762599df0010255e02350dd1c78296e3386bf5c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 15 Jun 2016 14:31:15 -0700 Subject: [PATCH] Remove unused variable --- atom/browser/native_window_mac.h | 2 +- atom/browser/native_window_mac.mm | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/atom/browser/native_window_mac.h b/atom/browser/native_window_mac.h index bf8125f119ac..f666aefbe565 100644 --- a/atom/browser/native_window_mac.h +++ b/atom/browser/native_window_mac.h @@ -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 diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index fe4cba4d16c8..a0b58d020908 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -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