Comment by fer
4 days ago
> I opened Slack on macOS, the icon kept bouncing in the dock for a few seconds. I got impatient, switched to Ghostty, and started typing. Just then, the Slack window appeared, stole focus from Ghostty and the git pull command was sent to the group chat.
I still don't understand how a full focus stealability debounce is not the norm. If I am in the middle of writing, or interacting with one UI bit in any way, no other app should be able to steal focus, full stop. Add an annoying popup if you want, make angry computer noises, flash icons, I don't care. 99.9, if not 100% of the time, it's completely unrelated to what I'm doing and can absolutely wait. While some OSs have something along these lines, they also give the tools to bypass it (I'm looking at you, Cisco AnyConnect! Being connected after clicking on connect is not an emergency!)
Imagine you're working in a terminal and an app decides to steal STDIN. Why do we accept that for a GUI?
Yes! Few things piss me off more. It boggles the mind that this behavior is the norm, and it happens all the time! There are practically 0 situations in which I want something to automatically steal focus.
Curiously, macOS is capable of putting a recently opened app out of focus. It happens consistently on my laptop when I haven't rebooted it for a while. It may be a bug, but it could be a feature, especially when it's conditioned by the user clicking in another window before launch completion.
For me, macOS seems to put opened apps out of focus when I have started doing something else since launching them, or when they were launched from elsewhere than the active app (eg by a terminal that's not in the foreground).
For some reason I have to deal with the opposite problem and have to click twice on a new window to get keyboard focus. Many times I'll switch windows (eg. from Messages to the browser), start typing and accidentally end up sending someone a message instead- even though the messages tab is completely out of view.
You can't really debounce it easily due to how the OS event queue work across processes and windows. One fix could be to not bing the focus to newly open windows (like you could in X11) but that's not what users want.
> but that's not what users want.
You don't know that until you ask users. That would be a much more useful question than those boring "tour guide on first login" or "please activate cortana/copilot" or "do you want to sync to onedrive" stuff one gets notified on some major desktops.
My preference is focus follow mouse, no focus stealing on new window opening.
Well, I would want the new app to steal focus, but only if I haven't (re-)focused a different app while said app was launching.
The users are trained on their exposure to behavior in Windows, MacOS and non-ancient Linux distros. Good luck changing the expectations of the world population. I believe the GIMP tried that for a few decades.
> annoying popup if you want, make angry computer noises, flash icons, I don't care.
I do, this is also pretty bad. User focus is more valuable than that