fix: avoid flicker when leaving fullscreen in frameless window (#27587)
This commit is contained in:
parent
b31217a889
commit
eb91b1c965
1 changed files with 5 additions and 7 deletions
|
@ -1490,11 +1490,6 @@ void NativeWindowMac::NotifyWindowEnterFullScreen() {
|
|||
void NativeWindowMac::NotifyWindowLeaveFullScreen() {
|
||||
NativeWindow::NotifyWindowLeaveFullScreen();
|
||||
exiting_fullscreen_ = false;
|
||||
// Add back buttonsView after leaving fullscreen mode.
|
||||
if (buttons_view_) {
|
||||
InternalSetStandardButtonsVisibility(false);
|
||||
[[window_ contentView] addSubview:buttons_view_];
|
||||
}
|
||||
}
|
||||
|
||||
void NativeWindowMac::NotifyWindowWillEnterFullScreen() {
|
||||
|
@ -1507,9 +1502,12 @@ void NativeWindowMac::NotifyWindowWillEnterFullScreen() {
|
|||
}
|
||||
|
||||
void NativeWindowMac::NotifyWindowWillLeaveFullScreen() {
|
||||
// Hide window title after leaving fullscreen.
|
||||
if (buttons_view_)
|
||||
// Hide window title and restore buttonsView when leaving fullscreen.
|
||||
if (buttons_view_) {
|
||||
[window_ setTitleVisibility:NSWindowTitleHidden];
|
||||
InternalSetStandardButtonsVisibility(false);
|
||||
[[window_ contentView] addSubview:buttons_view_];
|
||||
}
|
||||
exiting_fullscreen_ = true;
|
||||
RedrawTrafficLights();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue