Browse Source

Merge pull request #6429 from electron/fullscreen-menu-bar

Auto-hide menubar when in fullscreen
Cheng Zhao 8 years ago
parent
commit
33e8d5e0aa
1 changed files with 6 additions and 0 deletions
  1. 6 0
      atom/browser/native_window_views.cc

+ 6 - 0
atom/browser/native_window_views.cc

@@ -504,6 +504,12 @@ void NativeWindowViews::SetFullScreen(bool fullscreen) {
   else
     window_->native_widget_private()->ShowWithWindowState(
         ui::SHOW_STATE_FULLSCREEN);
+
+  // Auto-hide menubar when in fullscreen.
+  if (fullscreen)
+    SetMenuBarVisibility(false);
+  else
+    SetMenuBarVisibility(!menu_bar_autohide_);
 #endif
 }