diff --git a/macos/Sources/Features/Terminal/Window Styles/TitlebarTabsTahoeTerminalWindow.swift b/macos/Sources/Features/Terminal/Window Styles/TitlebarTabsTahoeTerminalWindow.swift index 2bf3bd42f..6cbd891bf 100644 --- a/macos/Sources/Features/Terminal/Window Styles/TitlebarTabsTahoeTerminalWindow.swift +++ b/macos/Sources/Features/Terminal/Window Styles/TitlebarTabsTahoeTerminalWindow.swift @@ -241,11 +241,11 @@ class TitlebarTabsTahoeTerminalWindow: TransparentTitlebarTerminalWindow, NSTool switch itemIdentifier { case .title: let item = NSToolbarItem(itemIdentifier: .title) - item.view = NSHostingView(rootView: TitleItem(viewModel: viewModel)) + item.view = ClickThroughHostingView(rootView: TitleItem(viewModel: viewModel)) // Fix: https://github.com/ghostty-org/ghostty/discussions/9027 item.view?.setContentCompressionResistancePriority(.required, for: .horizontal) item.visibilityPriority = .user - item.isEnabled = true + item.isEnabled = false // This is the documented way to avoid the glass view on an item. // We don't want glass on our title. @@ -308,3 +308,10 @@ extension TitlebarTabsTahoeTerminalWindow { } } } + +/// A "Ghosting" Hosting View, that acts like it's not there +private class ClickThroughHostingView: NSHostingView { + override func hitTest(_ point: NSPoint) -> NSView? { + nil + } +} diff --git a/macos/Sources/Features/Terminal/Window Styles/TitlebarTabsVenturaTerminalWindow.swift b/macos/Sources/Features/Terminal/Window Styles/TitlebarTabsVenturaTerminalWindow.swift index fe83fc5fd..905e88229 100644 --- a/macos/Sources/Features/Terminal/Window Styles/TitlebarTabsVenturaTerminalWindow.swift +++ b/macos/Sources/Features/Terminal/Window Styles/TitlebarTabsVenturaTerminalWindow.swift @@ -689,6 +689,11 @@ private class CenteredDynamicLabel: NSTextField { setContentCompressionResistancePriority(.defaultHigh, for: .horizontal) } + /// Click through, so we can double click here to enlarge current window + override func hitTest(_ point: NSPoint) -> NSView? { + nil + } + // Vertically center the text override func draw(_ dirtyRect: NSRect) { guard let attributedString = self.attributedStringValue.mutableCopy() as? NSMutableAttributedString else {