From: Cheng Zhao Date: Thu, 7 Aug 2014 07:07:34 +0000 (+0800) Subject: views: Show menu when "Alt" is up. X-Git-Tag: v0.15.4~2^2~4 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=09f9d0729cddf7bd958996f673390ba8d189d504;p=electron.git views: Show menu when "Alt" is up. --- diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index bf25ea87..1aafe6c0 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -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(); }