]> khamidou — GitHub mirrors - electron.git/commitdiff
views: Fix showing menu bar when pressing Alt for a long time
authorCheng Zhao <zcbenz@gmail.com>
Fri, 7 Nov 2014 07:20:16 +0000 (15:20 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 7 Nov 2014 07:20:16 +0000 (15:20 +0800)
atom/browser/native_window_views.cc

index 9a7e6d528be082323d6a19b6af7c6859861467a3..0a17b1787b525fe3002981e4fccfd667071b1fb7 100644 (file)
@@ -719,8 +719,7 @@ void NativeWindowViews::HandleKeyboardEvent(
     return;
 
   // Toggle the menu bar only when a single Alt is released.
-  if (event.type == blink::WebInputEvent::RawKeyDown && IsAltKey(event) &&
-      IsAltModifier(event)) {
+  if (event.type == blink::WebInputEvent::RawKeyDown && IsAltKey(event)) {
     // When a single Alt is pressed:
     menu_bar_alt_pressed_ = true;
   } else if (event.type == blink::WebInputEvent::KeyUp && IsAltKey(event) &&