From: Cheng Zhao Date: Fri, 17 Oct 2014 08:43:57 +0000 (+0800) Subject: win: Fix toggling the menubar, closes #681 X-Git-Tag: v0.18.1~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=85afa851dd16d90260857068e96bb8c3dc8ee11a;p=electron.git win: Fix toggling the menubar, closes #681 --- diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 75884e5d..77ff9691 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -692,7 +692,10 @@ void NativeWindowViews::HandleKeyboardEvent( // When a single Alt is pressed: menu_bar_alt_pressed_ = true; } else if (event.type == blink::WebInputEvent::KeyUp && IsAltKey(event) && - event.modifiers == 0 && menu_bar_alt_pressed_) { +#if defined(USE_X11) + event.modifiers == 0 && +#endif + menu_bar_alt_pressed_) { // When a single Alt is released right after a Alt is pressed: menu_bar_alt_pressed_ = false; SetMenuBarVisibility(!menu_bar_visible_);