From fc7f9f87e51dba8c3d8a04f99380868e7f15686f Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 17:54:41 +0000 Subject: [PATCH] Bug 1912338 - Consistently hide macOS titlebar separator for full screen windows. r=mac-reviewers,bradwerth In bug 1906034, I attempted to preserve the workaround for the white line issue from bug 1700211, but it did not prevent the white line from appearing. Hiding the separator in response to full-screen events avoids the issue. Differential Revision: https://phabricator.services.mozilla.com/D221576 --- widget/cocoa/nsCocoaWindow.mm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm index df9782494c7e..708b79ebf59e 100644 --- a/widget/cocoa/nsCocoaWindow.mm +++ b/widget/cocoa/nsCocoaWindow.mm @@ -2843,6 +2843,14 @@ void nsCocoaWindow::CocoaWindowDidResize() { [titlebarContainerView setTransparent:NO]; } + if (@available(macOS 11.0, *)) { + // In order to work around a drawing bug with titlebarAppearsTransparent + // windows in full screen mode, disable titlebar separators for full + // screen windows. The drawing bug was filed as FB9056136. See bug 1700211 + // and bug 1912338 for more details. + window.titlebarSeparatorStyle = NSTitlebarSeparatorStyleNone; + } + if (!mGeckoWindow) { return; }