Remix.run Logo
fer 6 hours 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?

tgv 4 hours ago | parent | next [-]

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.

varjag 6 hours ago | parent | prev | next [-]

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.

prmoustache 5 hours ago | parent [-]

> 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.

addandsubtract 3 hours ago | parent | next [-]

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.

varjag 5 hours ago | parent | prev [-]

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.

eviks 5 hours ago | parent | prev [-]

> 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