This is, quite unironically, the type of development I wish Apple would pursue for macOS. It's 2025 and focus stealing is still a topic we can have a serious conversation about. Why? "I want to use my computer without random popups accidentally eating my keyboard commands and doing things without my consent" is not /that/ unreasonable of an ask.
Oh man, I loathe when I close a Microsoft Excel window on macos and my whole desktop virtual space jumps to some other virtual space that happens to still have an Excel window open.
Only slightly less irksome is that the undo history spans all open documents commingled.
Where has macOS focus stealing let you down other than Microsoft applications?
I think about everything that's not made by Apple focus steals. And Apple allows them.
I suppose that's why they developer liquid glass, if they make the screen unreadable it won't matter that the wrong application is focused.
This happens to me regularly on computers running MacOS, including with system prompts that appear too quick while I'm typing for me to tell you what I even hit enter/space on.
I like to have a new Emacs frame pop up for Org capture, but when the frame closes, focus is then given to Emacs instead of being restored to whatever I was using before I used the global hotkey to summon the new frame for the Org-capture buffer.
I have the same problem for opening any text file in a text editor from a separate terminal emulator. If I have any other editor windows open, if I save and close that file, focus is not restored to my terminal application.
It should be noted that this isn't true focus stealing, which is when a new window (that you didn't ask for) pops up and suddenly grabs focus from what you're doing. This is just macOS' app-based rather than window-based GUI task switching behavior sucking like it has always sucked.
Hilariously LibreOffice steals this "functionality", at least in KDE.
Everywhere. All the time.
It's even more infuriating when I want the focus but because it's on a different space MacOS bugs out and refuses to switch. Not to mention when I have an app set to all spaces and reboot and it's stuck on a single space. Nobody at Apple uses MacOS.
I get various app update dialogs opening up and stealing focus. Fusion360 is pretty bad when you open it - it takes forever too.
Focus stealing happens quite a lot on macOS.
The VPN client I use for work will pop up and steal focus every few minutes if it's running but not logged in.
My "favourite" (/s) feature is windows that _stick_ on top of others. Like, some updater for some app that just stays on top of other windows even without having the focus.
Oh, and all these times where a running program doesn't want to be focused. I run my shortcut to focus it, nothing. I type its name in spotlight, nothing. I click its icon in the dock, magic, it gets into focus!
Or when the dock doesn't hide away as it should but just stays there for unknown reasons.
> My "favourite" (/s) feature is windows that _stick_ on top of others. Like, some updater for some app that just stays on top of other windows even without having the focus.
Then in Apple's infinite wisdom, doesn't let you manually set a window to be always on top - one of my most missed features from Gnome, KDE, and even Windows has it with PowerToys.
I love my macbook's hardware, but macOS has to be one of the most frustrating operating systems I've ever used.
Agree to both points. The UI part of macOS is trash, and there are a few times I'd like to have kept a window on top but couldn't despite the random updaters and reminders doing it without asking.
I just wrote a "program" (ok, tiny utility) that behaves like you describe, but don't worry, it's for my personal use so you you won't have to deal with it :)
(i run it when I have an image in the clipboard and it shows an always-on-top window with that image. i can drag it around but it doesn't take focus. it's so on my single monitor setup (aka laptop on the couch) I can take a snapshot of something and then easily reference it in a maximized/semi-fullscreen application). I honestly mostly wrote it to see how fiddly winapi stuff from rust is but I actually end up using it a bunch)
I see where Wayland is coming from but I've come around to preferring the chaos of every app getting to do whatever it wants over hoping that various compositors are willing to support some obscure special case some app or other might want. Like, it sucks if apps are misbehaving but it sucks more if you can't reasonably fix an app to behave like you want it at all.
I actually really like the AmigaOS way. Where all windows have this behaviour. In fact, bringing something to the foreground is an explicit action. Sounds weird, but it allows you to, for example, drag something from a background window to the foreground one, or have a background window in focus.
For the first thing:
Right click the titlebar (or left-click the icon at the left corner thereof) -> M_ore Actions -> uncheck "Keep A_bove Others".
Personally I activate it quite frequently, e.g. to keep a small text editor or terminal open in front of a maximized browser window for reference.
KDE has special settings for focus-stealing and focus-protection. You can apply these settings per window, per window-class, per application.
So, anything breaking these very mature mechanisms is a red flag, and is taken seriously.
What I want on macos is that Finder can't have focus if there are zero finder windows on top and the desktop is not fully uncovered, maybe not even then. What already happened once for me is that I accidentally triggered undo thinking I had Firefox focused, because that was the visible window, and I failed to look at the menu bar, so instead I managed to undo a copy or move action in Finder, I'm not even sure what it was, because all you get is a plink sound and Finder doesn't help you figure out what you just did. It's a recipe for disaster, I imagine I could unknowingly screw things up big time.
I just moved to macOS for the first time, and my only way to adapt to its multi-tasking has been keeping exactly one window per open application, never zero or more than one. The fact that Finder can't be treated like that is a real pain. I will focus on it essentially randomly, and it will disrupt my intended interaction.
I don't get the reasoning behind the zero-window cmd-tab interaction, but if it is there I guess that there's a reason behind it?
On macOS you can have an app that is running without any windows open and you use the menu bar to invoke different commands in that app. This is why cmd+tab allows you to switch to an app that doesn't have any window open, essentially cmd+tab is an app switcher and not a window switcher. If you want a window switcher you can use AltTab an open source window switcher for macOS.
Why is there no finder specific setting that if it receives focus and has no window open it automatically creates the default one?
The current behavior is such a terrible user experience.
I don't know how a company as big as apple can leave everyday things in such a terrible state.
Consider that, with your proposal:
1) If you had a single Finder window open, then closed it, focus would get stolen by whatever other application happened to have a window open.
2) There would be no way to use the keyboard to interact with an item on the desktop without first closing or hiding every running application.
Truth be told, the desktop is already a kind of weird folder that is obstructed by all other windows, so I wouldn't really care about those types of inconsistencies. So for the first case, I wouldn't mind if closing the last finder window would jump to the next app in the tabbing order as if I quit it. The second case is a bit more tricky, but I think it's should be a matter of focusing only if I click on the desktop specifically and not in any other case, eg tabbing or closing other windows.
Yeah, starting MacOS, with apps set to restore windows, is an exercise in frustration for the first minute or two. I try to work on the app I want, only to be constantly interrupted by many windows that keep popping up and stealing the focus.
Thankfully it's quite easy to go for several weeks without rebooting, but this is so annoying.
Oh my. Yes.