fix: make titlebar opaque while fullscreen (#39759)

This commit is contained in:
Samuel Attard 2023-09-07 15:55:17 -07:00 committed by GitHub
parent 5fa9dee68a
commit 0b44f433c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1692,6 +1692,9 @@ void NativeWindowMac::NotifyWindowEnterFullScreen() {
// Restore the window title under fullscreen mode. // Restore the window title under fullscreen mode.
if (buttons_proxy_) if (buttons_proxy_)
[window_ setTitleVisibility:NSWindowTitleVisible]; [window_ setTitleVisibility:NSWindowTitleVisible];
if (transparent() || !has_frame())
[window_ setTitlebarAppearsTransparent:NO];
} }
void NativeWindowMac::NotifyWindowLeaveFullScreen() { void NativeWindowMac::NotifyWindowLeaveFullScreen() {
@ -1701,6 +1704,9 @@ void NativeWindowMac::NotifyWindowLeaveFullScreen() {
[buttons_proxy_ redraw]; [buttons_proxy_ redraw];
[buttons_proxy_ setVisible:YES]; [buttons_proxy_ setVisible:YES];
} }
if (transparent() || !has_frame())
[window_ setTitlebarAppearsTransparent:YES];
} }
void NativeWindowMac::NotifyWindowWillEnterFullScreen() { void NativeWindowMac::NotifyWindowWillEnterFullScreen() {