|
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. |
Replies: 3 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. |
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). |
|
Came across this discussion while looking for an option on how to actually disable this behavior. While it may be conventional, it also makes user to do extra mile, what makes app feel (subjectively) slow, especially when coming from windows or linux (gnome). Just a brief test summary on "acceptsFirstInput", referencing a few apps open currently for me:
What i'm trying to say, it's not all black and white, and, frankly speaking, it's a bit disappointing to have such behavior change at least without option to fall back :( P.S. Just don't remove quit-after-last-window-closed please :) |
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.