views: Only toggle menu bar when auto-hide-menu-bar is turned on.
This commit is contained in:
parent
936860edd5
commit
c4b0170a0a
1 changed files with 5 additions and 2 deletions
|
@ -568,6 +568,11 @@ void NativeWindowViews::HandleMouseDown() {
|
|||
void NativeWindowViews::HandleKeyboardEvent(
|
||||
content::WebContents*,
|
||||
const content::NativeWebKeyboardEvent& event) {
|
||||
keyboard_event_handler_->HandleKeyboardEvent(event, GetFocusManager());
|
||||
|
||||
if (!menu_bar_autohide_)
|
||||
return;
|
||||
|
||||
// Toggle the menu bar only when a single Alt is released.
|
||||
if (event.type == blink::WebInputEvent::RawKeyDown && IsAltKey(event) &&
|
||||
IsAltModifier(event)) {
|
||||
|
@ -583,8 +588,6 @@ void NativeWindowViews::HandleKeyboardEvent(
|
|||
// When any other keys except single Alt have been pressed/released:
|
||||
menu_bar_alt_pressed_ = false;
|
||||
}
|
||||
|
||||
keyboard_event_handler_->HandleKeyboardEvent(event, GetFocusManager());
|
||||
}
|
||||
|
||||
bool NativeWindowViews::AcceleratorPressed(const ui::Accelerator& accelerator) {
|
||||
|
|
Loading…
Reference in a new issue