From f219e7f0dd567a93581335973ffa41ab9e42f072 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 7 Aug 2014 14:02:03 +0800 Subject: [PATCH] views: Switching to other window should hide the menubar. --- atom/browser/native_window_views.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 9a78fa3983..bf58b2094d 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -439,6 +439,12 @@ void NativeWindowViews::OnWidgetActivationChanged( NotifyWindowFocus(); else NotifyWindowBlur(); + + // The menu bar should be hide when window is closed + if (!active && menu_bar_autohide_ && menu_bar_show_) { + SetMenuBarVisibility(false); + Layout(); + } } void NativeWindowViews::DeleteDelegate() {