From d80d84862e3b10bf97cfcda67b241152db2fe4e8 Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Thu, 19 Mar 2026 19:16:13 +0100 Subject: [PATCH] macOS: fix mouse not working correctly in CommandPaletteView (#11658) --- .../Sources/Ghostty/Surface View/SurfaceView_AppKit.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift b/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift index 3129acfba..2289a3bdd 100644 --- a/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift +++ b/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift @@ -652,6 +652,14 @@ extension Ghostty { } private func localEventLeftMouseDown(_ event: NSEvent) -> NSEvent? { + let isCommandPaletteVisible = (event.window?.windowController as? BaseTerminalController)? + .commandPaletteIsShowing == true + guard !isCommandPaletteVisible else { + // We don't want to process events that + // are supposed to be handled by CommandPaletteView + return event + } + // We only want to process events that are on this window. guard let window, event.window != nil,