Merge pull request #1884 from ghostty-org/tabs

macos: titlebar tabs should do nothing if no titlebar
This commit is contained in:
Mitchell Hashimoto
2024-06-25 10:13:34 -07:00
committed by GitHub

View File

@ -194,7 +194,9 @@ class TerminalWindow: NSWindow {
newTabButtonImageLayer = nil
effectViewIsHidden = false
if titlebarTabs {
// We can only update titlebar tabs if there is a titlebar. Without the
// styleMask check the app will crash (issue #1876)
if titlebarTabs && styleMask.contains(.titled) {
guard let tabBarAccessoryViewController = titlebarAccessoryViewControllers.first(where: { $0.identifier == Self.TabBarController}) else { return }
tabBarAccessoryViewController.layoutAttribute = .right