From ad0c5fbec3e23f0e414ba3ebed1181f42000cfdb Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Thu, 26 Mar 2026 19:53:12 +0100 Subject: [PATCH] macOS: fix regression caused by 3ee8ef4f650f550698ee1e8e81e591511e195bf4 --- macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift b/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift index 2289a3bdd..8f4fb01cf 100644 --- a/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift +++ b/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift @@ -667,7 +667,9 @@ extension Ghostty { // The clicked location in this window should be this view. let location = convert(event.locationInWindow, from: nil) - guard hitTest(location) == self else { return event } + // We should use window to perform hitTest here, + // because there could be some other overlays on top, like search bar + guard window.contentView?.hitTest(location) == self else { return event } // We always assume that we're resetting our mouse suppression // unless we see the specific scenario below to set it.