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() {
|
void NativeWindowMac::NotifyWindowLeaveFullScreen() {
|
||||||
NativeWindow::NotifyWindowLeaveFullScreen();
|
NativeWindow::NotifyWindowLeaveFullScreen();
|
||||||
exiting_fullscreen_ = false;
|
exiting_fullscreen_ = false;
|
||||||
// Add back buttonsView after leaving fullscreen mode.
|
|
||||||
if (buttons_view_) {
|
|
||||||
InternalSetStandardButtonsVisibility(false);
|
|
||||||
[[window_ contentView] addSubview:buttons_view_];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowMac::NotifyWindowWillEnterFullScreen() {
|
void NativeWindowMac::NotifyWindowWillEnterFullScreen() {
|
||||||
|
@ -1507,9 +1502,12 @@ void NativeWindowMac::NotifyWindowWillEnterFullScreen() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowMac::NotifyWindowWillLeaveFullScreen() {
|
void NativeWindowMac::NotifyWindowWillLeaveFullScreen() {
|
||||||
// Hide window title after leaving fullscreen.
|
// Hide window title and restore buttonsView when leaving fullscreen.
|
||||||
if (buttons_view_)
|
if (buttons_view_) {
|
||||||
[window_ setTitleVisibility:NSWindowTitleHidden];
|
[window_ setTitleVisibility:NSWindowTitleHidden];
|
||||||
|
InternalSetStandardButtonsVisibility(false);
|
||||||
|
[[window_ contentView] addSubview:buttons_view_];
|
||||||
|
}
|
||||||
exiting_fullscreen_ = true;
|
exiting_fullscreen_ = true;
|
||||||
RedrawTrafficLights();
|
RedrawTrafficLights();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue