diff --git a/macos/Sources/Features/Terminal/BaseTerminalController.swift b/macos/Sources/Features/Terminal/BaseTerminalController.swift index 6e4807c1a..432345627 100644 --- a/macos/Sources/Features/Terminal/BaseTerminalController.swift +++ b/macos/Sources/Features/Terminal/BaseTerminalController.swift @@ -235,12 +235,12 @@ class BaseTerminalController: NSWindowController, // Set the main window title window.title = to - + } func pwdDidChange(to: URL?) { guard let window else { return } - + if ghostty.config.macosTitlebarProxyIcon == .visible { // Use the 'to' URL directly window.representedURL = to diff --git a/macos/Sources/Features/Terminal/TerminalController.swift b/macos/Sources/Features/Terminal/TerminalController.swift index 0b1ff3b72..c22ac7042 100644 --- a/macos/Sources/Features/Terminal/TerminalController.swift +++ b/macos/Sources/Features/Terminal/TerminalController.swift @@ -310,6 +310,14 @@ class TerminalController: BaseTerminalController { // Disallow tabbing if the titlebar is hidden, since that will (should) also hide the tab bar. window.tabbingMode = .disallowed + + // Nuke it from orbit -- hide the titlebar container entirely, just in case. There are + // some operations that appear to bring back the titlebar visibility so this ensures + // it is gone forever. + if let themeFrame = window.contentView?.superview, + let titleBarContainer = themeFrame.firstDescendant(withClassName: "NSTitlebarContainerView") { + titleBarContainer.isHidden = true + } } // In various situations, macOS automatically tabs new windows. Ghostty handles