win: Fix toggling the menubar, closes #681

This commit is contained in:
Cheng Zhao 2014-10-17 16:43:57 +08:00
parent 57acdc1bf6
commit 85afa851dd

View 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_);