Restore thick frame full screen case
This commit is contained in:
parent
71512ad244
commit
e82b41724d
1 changed files with 14 additions and 0 deletions
|
@ -487,6 +487,20 @@ void NativeWindowViews::SetFullScreen(bool fullscreen) {
|
||||||
NotifyWindowLeaveFullScreen();
|
NotifyWindowLeaveFullScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For window without WS_THICKFRAME style, we can not call SetFullscreen().
|
||||||
|
// This path will be used for transparent windows as well.
|
||||||
|
if (!thick_frame_) {
|
||||||
|
if (fullscreen) {
|
||||||
|
restore_bounds_ = GetBounds();
|
||||||
|
auto display =
|
||||||
|
display::Screen::GetScreen()->GetDisplayNearestPoint(GetPosition());
|
||||||
|
SetBounds(display.bounds(), false);
|
||||||
|
} else {
|
||||||
|
SetBounds(restore_bounds_, false);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// We set the new value after notifying, so we can handle the size event
|
// We set the new value after notifying, so we can handle the size event
|
||||||
// correctly.
|
// correctly.
|
||||||
window_->SetFullscreen(fullscreen);
|
window_->SetFullscreen(fullscreen);
|
||||||
|
|
Loading…
Reference in a new issue