]> khamidou — GitHub mirrors - electron.git/commitdiff
:bug: Solves issue #2047 [Windows fullscreen bug]
authorankitaggarwal011 <ankitaggarwal011@gmail.com>
Sun, 28 Jun 2015 09:42:59 +0000 (15:12 +0530)
committerankitaggarwal011 <ankitaggarwal011@gmail.com>
Sun, 28 Jun 2015 18:40:51 +0000 (00:10 +0530)
atom/browser/native_window_views.cc

index 96997222e27e1c621c6bf397118024d75fe8eb82..b8a16f2bff6749dcfcfe2861d6df0e9c38f22e76 100644 (file)
@@ -418,17 +418,19 @@ bool NativeWindowViews::IsMinimized() {
 }
 
 void NativeWindowViews::SetFullScreen(bool fullscreen) {
-  if (IsVisible())
-    window_->SetFullscreen(fullscreen);
-  else
-    window_->native_widget_private()->ShowWithWindowState(
-        ui::SHOW_STATE_FULLSCREEN);
 #if defined(OS_WIN)
   // There is no native fullscreen state on Windows.
+  window_->SetFullscreen(fullscreen);
   if (fullscreen)
     NotifyWindowEnterFullScreen();
   else
     NotifyWindowLeaveFullScreen();
+#else
+  if (IsVisible())
+    window_->SetFullscreen(fullscreen);
+  else
+    window_->native_widget_private()->ShowWithWindowState(
+        ui::SHOW_STATE_FULLSCREEN);
 #endif
 }