-
On macOS, clicks in inactive windows conventionally raise the window without performing any further action. This UI principle (as with all macOS UI principles…) has been eroded over the years, but still holds strong in Terminal.app. Ghostty violates it, which is surprising when switching between terminal applications with mouse support. I’d be happy to try making a PR for this, although I’m less sure where to start than with the GPU selection. Not sure what the GNOME convention is and whether it should be matched there. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Just converting to a discussion until we narrow this down further, then I'll convert it back once we have an actionable conclusion. I believe this was done on purpose but can't remember why. Here is the code that does it with a comment: override func acceptsFirstMouse(for event: NSEvent?) -> Bool {
// "Override this method in a subclass to allow instances to respond to
// click-through. This allows the user to click on a view in an inactive
// window, activating the view with one click, instead of clicking first
// to make the window active and then clicking the view."
return true
} I'm trying to find the history of why we do this. |
Beta Was this translation helpful? Give feedback.
-
In further researching this, I want to clarify that this doesn't seem to be unconditionally true. It seems to depend on the UI element. For example, NSScrollBars immediately respond to an unfocused click. So, it seems to depend based on what the behavior of the UI element is. I note this because it does give us some wiggle room on how we interpret our clicks in our views. It doesn't seem to be an unconditional macOS truth (I haven't referenced the HIG yet). |
Beta Was this translation helpful? Give feedback.
I agree, this is what I'm leaning towards.
I'm pretty happy with the split focus changing, and I think that's pretty harmless (just something to get used to). Given the prior art to some extent with iTerm2 I think that makes it extra okay too.
EDIT: Opened issue #2595 for this.