From: Cheng Zhao Date: Thu, 7 Aug 2014 06:02:03 +0000 (+0800) Subject: views: Switching to other window should hide the menubar. X-Git-Tag: v0.15.4~2^2~8 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=f219e7f0dd567a93581335973ffa41ab9e42f072;p=electron.git views: Switching to other window should hide the menubar. --- diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 9a78fa39..bf58b209 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() {