From: ankitaggarwal011 Date: Sun, 28 Jun 2015 09:42:59 +0000 (+0530) Subject: :bug: Solves issue #2047 [Windows fullscreen bug] X-Git-Tag: v0.29.2~19^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=1c907ffa365482f67850d1a392452f149581135c;p=electron.git :bug: Solves issue #2047 [Windows fullscreen bug] --- diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 96997222..b8a16f2b 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -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 }