For me it fits-to-content both vertically and horizontally. I just tested in both list- and icon-view. Mac OS 12.
> When I close a window and then press Cmd+tab, the icon is still there
This is because the Mac UI application/document conceptual model, which has been consistent since at least the 1980s. An application is either open or not. If you have multiple documents open, they are open within a single instance of the application. You can also have zero documents open. The application doesn't quit automatically when you close the last document.
Other operating systems flatten these two concepts into one, such that each new document appears as a new instance of the application.
I'm not suggesting one is better than the other. Just that I don't consider this a lack-of-finesse since it's been my mental model for 25+ years.
I'm also not disagreeing with your overall point. I can think of plenty of inconsistencies and lack-of-finesse in modern Mac OS UI, to be sure!
It drives me nuts on Windows that when I close FireFox the entire APPLICATION closes! I just wanted to close the window. Now when I start it again / open a new window, I have to enter my LastPass credentials. And pay the boot penalty.
IMHO, a multi-window app should not exit when I close the last window.
Linux Desktops and Windows both do this, macOS does not.
On Linux' Firefox, this does not seem to be the case. I just confirmed by closing a window with a few dozen tabs, and my other windows were perfectly fine. Same goes for VS Code, IDEA, Ghidra, Tilix, etc. This might be Wayland-specific behavior, but closing one window does not appear to take the rest of the apps with it (unless they were a child process).
But you always need ONE child window open or it will exit entirely.
MacOS has a different approach, where the application top level process keeps running, even if it has no windows, but this requires some sort of GUI element to communicate with application.
That is nonsense. It is just a different model and the model Mac users have been used to since the 80ies. When I close a window/document, I often want to another document with the same application, so why close it? If I want to close an applications, I can use Cmd-q. Moreover, their visual presence is not gone, such an application is still in the Dock and in the app switcher.
And why do I care if an application continues running? If it hasn't been used for some time, macOS compresses its pages. And inactive native applications will be put in App Nap, which freezes the application, so that it doesn't use system resources until it is activated again.
There is a third space on mac, different from a menubar, called "dock". In the old days it was integrated into the main persistent menu bar, but was removed maybe in the early 2000's. Personally I prefer one menubar, but at least I can hide the dock.
EDIT: "dock" not "launchpad". Duh.
And with Firefox, it would make the "Restore all tabs on open" not work, since clicking X didn't close the app, and thus pressing Firefox again would just create a new empty window. For it to work, I had to not use the red button, but cmd + q or the menu bar.
Of course, I'd argue that maximise is the intuitive thing to expect, but the behaviour is not strictly broken, just... odd.
The behavior is inherited from the classic Mac OS which initially predates and was developed contemporaneously with Windows. Apple assigned one behavior and Microsoft assigned another. To the extent that one is “more intuitive” it’s because your expectations as to what should happen is different, and “maximize” is a lot easier to behaviorally define, describe and program than “zoom” so GUI programmers preferred it, or knew it better because the behavior and conventions they mimicked in X window managers were taken from what Microsoft was doing at the time.
When screen resolutions are 640x480 or 800x600 or even 1024x768, maybe you just want maximize all the time; but maximize is an anti-feature to me on anything bigger.
This behavior is called “Zoom”, and it’s defined per-application by that application. You could change that system-wide to minimize.
> […] when I close a window and then press Cmd+tab, the icon is still there, and if I select it nothing shows up.
Yes, the application hasn’t quit. You’ve only closed its last window.
To further expand on this, this is also application-defined behaviour. The application can choose whether it wants to stay open or close. This is no different from Windows (e.g. closing a Spotify window will just minimize it to taskbar), it's just that Cmd+Tab by default shows all running applications, whereas Win+Tab/Alt+Tab on Windows by default shows open windows.
If I want the app closed, cmd+q / alt+f4. Repeated cmd+w / ctrl+w shouldn't also close the app (IMO).
In either case, I find both implementations sloppy. Apple's solution is complete but redundant, and Windows' solution is simple but lacking. I have to give it to KDE and GNOME, both desktops manage to 'fix' this problem by encouraging people to minimize apps they aren't using. Your (X) icon still has the magic power to kill processes, and you get to keep your precious applications when you're done using them. Boom, no need for ultra-complex Application/Window/Form/Dialog hierarchy for the user to wrap their mind around. Simple solution to a simple problem.
Closing it via the "x" will minimize to tray and hide (which is the behavior I want, but an example nonetheless)