From 51cd63871d5ef9b120f13515e2c67f1b94a65e23 Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Mon, 30 Mar 2026 12:14:30 +0200 Subject: [PATCH] macos: passthrough right mouse down event to TabTitleEditor if needed (#11150) --- .../Features/Terminal/Window Styles/TerminalWindow.swift | 4 ++++ macos/Sources/Helpers/TabTitleEditor.swift | 1 + 2 files changed, 5 insertions(+) diff --git a/macos/Sources/Features/Terminal/Window Styles/TerminalWindow.swift b/macos/Sources/Features/Terminal/Window Styles/TerminalWindow.swift index e19d6711f..ac1d2b881 100644 --- a/macos/Sources/Features/Terminal/Window Styles/TerminalWindow.swift +++ b/macos/Sources/Features/Terminal/Window Styles/TerminalWindow.swift @@ -184,6 +184,10 @@ class TerminalWindow: NSWindow { return } + if tabTitleEditor.handleRightMouseDown(event) { + return + } + super.sendEvent(event) } diff --git a/macos/Sources/Helpers/TabTitleEditor.swift b/macos/Sources/Helpers/TabTitleEditor.swift index 4be2c5306..3e04d73c1 100644 --- a/macos/Sources/Helpers/TabTitleEditor.swift +++ b/macos/Sources/Helpers/TabTitleEditor.swift @@ -125,6 +125,7 @@ final class TabTitleEditor: NSObject, NSTextFieldDelegate { /// /// If this returns true then the event was handled by the coordinator. func handleRightMouseDown(_ event: NSEvent) -> Bool { + guard event.type == .rightMouseDown else { return false } if isMouseEventWithinEditor(event) { inlineTitleEditor?.rightMouseDown(with: event) return true