From 7f217fc3266db877d118b028b03f05e69e1d7e52 Mon Sep 17 00:00:00 2001 From: Qwerasd Date: Sun, 4 Feb 2024 14:22:44 -0500 Subject: [PATCH] fix(macOS): Hide titlebar separator line in native fullscreen. --- macos/Sources/Helpers/FullScreenHandler.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/macos/Sources/Helpers/FullScreenHandler.swift b/macos/Sources/Helpers/FullScreenHandler.swift index 2bb716c00..8046b7b55 100644 --- a/macos/Sources/Helpers/FullScreenHandler.swift +++ b/macos/Sources/Helpers/FullScreenHandler.swift @@ -20,6 +20,8 @@ class FullScreenHandler { leaveFullscreen(window: window) isInNonNativeFullscreen = false } else { + // Restore titlebar separator style. See below for explanation. + window.titlebarSeparatorStyle = .automatic window.toggleFullScreen(nil) } isInFullscreen = false @@ -29,6 +31,10 @@ class FullScreenHandler { enterFullscreen(window: window, hideMenu: hideMenu) isInNonNativeFullscreen = true } else { + // The titlebar separator shows up erroneously in fullscreen if the tab bar + // is made to appear and then disappear by opening and then closing a tab. + // We get rid of the separator while in fullscreen to prevent this. + window.titlebarSeparatorStyle = .none window.toggleFullScreen(nil) } isInFullscreen = true