🐛 Solves issue #2047 [Windows fullscreen bug]

This commit is contained in:
ankitaggarwal011 2015-06-28 15:12:59 +05:30
parent 1e514620b5
commit 1c907ffa36

View file

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