macOS: fix 12266 by using the correct coordinates for the hitTest

Regression of #11872
This commit is contained in:
Lukas
2026-04-17 20:05:18 +02:00
parent ca7516bea6
commit 5939b8c1be

View File

@@ -617,7 +617,11 @@ extension Ghostty {
window == event.window else { return event }
// The clicked location in this window should be this view.
let location = convert(event.locationInWindow, from: nil)
guard
let location = window.contentView?.convert(event.locationInWindow, from: nil)
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 }