]> khamidou — GitHub mirrors - electron.git/commitdiff
win: Fix toggling the menubar, closes #681
authorCheng Zhao <zcbenz@gmail.com>
Fri, 17 Oct 2014 08:43:57 +0000 (16:43 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 17 Oct 2014 08:43:57 +0000 (16:43 +0800)
atom/browser/native_window_views.cc

index 75884e5d710fdc996f3a0ed8f121a23a3dab8f7f..77ff969140cc6e576581d8856726286a6a048a25 100644 (file)
@@ -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_);