From 0b44f433c8764e710ad5a36b8e82cc5720dd1be0 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 7 Sep 2023 15:55:17 -0700 Subject: [PATCH] fix: make titlebar opaque while fullscreen (#39759) --- shell/browser/native_window_mac.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index d3d0152497d3..e339366b05a2 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -1692,6 +1692,9 @@ void NativeWindowMac::NotifyWindowEnterFullScreen() { // Restore the window title under fullscreen mode. if (buttons_proxy_) [window_ setTitleVisibility:NSWindowTitleVisible]; + + if (transparent() || !has_frame()) + [window_ setTitlebarAppearsTransparent:NO]; } void NativeWindowMac::NotifyWindowLeaveFullScreen() { @@ -1701,6 +1704,9 @@ void NativeWindowMac::NotifyWindowLeaveFullScreen() { [buttons_proxy_ redraw]; [buttons_proxy_ setVisible:YES]; } + + if (transparent() || !has_frame()) + [window_ setTitlebarAppearsTransparent:YES]; } void NativeWindowMac::NotifyWindowWillEnterFullScreen() {