Skip to content

Commit e82b417

Browse files
committed
Restore thick frame full screen case
1 parent 71512ad commit e82b417

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

atom/browser/native_window_views.cc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,20 @@ void NativeWindowViews::SetFullScreen(bool fullscreen) {
487487
NotifyWindowLeaveFullScreen();
488488
}
489489

490+
// For window without WS_THICKFRAME style, we can not call SetFullscreen().
491+
// This path will be used for transparent windows as well.
492+
if (!thick_frame_) {
493+
if (fullscreen) {
494+
restore_bounds_ = GetBounds();
495+
auto display =
496+
display::Screen::GetScreen()->GetDisplayNearestPoint(GetPosition());
497+
SetBounds(display.bounds(), false);
498+
} else {
499+
SetBounds(restore_bounds_, false);
500+
}
501+
return;
502+
}
503+
490504
// We set the new value after notifying, so we can handle the size event
491505
// correctly.
492506
window_->SetFullscreen(fullscreen);

0 commit comments

Comments
 (0)