Merge pull request #2074 from ankitaggarwal011/windows-fullscreen-bug
🐛 Solves issue #2047 [Windows fullscreen bug]
This commit is contained in:
commit
506d6688e0
1 changed files with 8 additions and 6 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue