]> khamidou — GitHub mirrors - electron.git/commitdiff
views: Show menu when "Alt" is up.
authorCheng Zhao <zcbenz@gmail.com>
Thu, 7 Aug 2014 07:07:34 +0000 (15:07 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 7 Aug 2014 07:07:34 +0000 (15:07 +0800)
atom/browser/native_window_views.cc

index bf25ea87fa2771530b702499d68b8f5f300bbf8d..1aafe6c0e2feedbd1b04a09eb9d879c30763b3e5 100644 (file)
@@ -549,14 +549,13 @@ void NativeWindowViews::HandleKeyboardEvent(
     content::WebContents*,
     const content::NativeWebKeyboardEvent& event) {
   if (menu_bar_autohide_ &&
-      (event.modifiers & content::NativeWebKeyboardEvent::AltKey) &&
 #if defined(USE_X11)
       // 164 and 165 represent VK_LALT and VK_RALT.
       (event.windowsKeyCode == 164 || event.windowsKeyCode == 165) &&
 #else
       (event.windowsKeyCode == ui::VKEY_MENU) &&
 #endif
-      (event.type == blink::WebInputEvent::RawKeyDown)) {
+      (event.type == blink::WebInputEvent::KeyUp)) {
     SetMenuBarVisibility(!menu_bar_show_);
     Layout();
   }