Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you want to close a program, that's Cmd-Q. 95% of the programs I run will not harass me about closing down, they just instantly do it.

If you want to close a window, that's Cmd-W.

Why would you expect a Cmd-W to turn into a Cmd-Q if it's the last window open? That makes no sense to me. Just close the program you aren't using.



The UI only offers a big red X button. You have no idea what it does, until you click it. Maybe it will close a window. Maybe it will close the last window leaving the app running in the background with no UI. Maybe it will quit the app.

In KDE/Gnome/Windows you know what the X buttons does. It closes an instance of an app. If it happens to be the only instance of the app, it will close the app as well. You don't have to babysit the open apps.

For the very few exceptions that an app needs to run in the backround, you will be notified that by pressing X the app will go to the taskbar.

MacOS also has a taskbar for apps that run in the background, but it also has apps running in the background in the dock. It made sense a decade ago with the slow hard drives, now it is just a peril of the past. Similar to the C drive in windows.


This isn't just a difference in UI, but also in the way the OS handles processes. Under macOS, the vast majority of programs host all windows under the same process. In other words, windows do not represent instances of apps, even under the hood. You can spawn additional instances of an app with the terminal, which will give each instance its own dock icon, menubar, and set of windows.

So shifting window closing behavior to function like that of Linux or Windows would actually require a much more fundamental change than it might seem.


The Apple HIG says there's a difference between applications and documents. An application might have a bunch of utility windows but those are hidden unless the application is in the foreground. So an application with no open documents running in the background isn't visually cluttering the screen. Application launch tends to be (and definitely used to be twenty years ago) pretty expensive in terms of resources. So leaving an application open without documents tends to make opening new documents faster.

The red button on windows on macOS is meant to convey the action is potentially destructive to the window's contents. Even if the "destruction" of a utility window just means it goes away. It's not tied to quitting the application, with exception of single-window applications like System Preferences, for the above launch cost reasoning.

This has all gotten muddy over the past twenty years. The App Resume/Restore feature in Lion (peak Forstall) is terrible and I disable it on every Mac I use for more than a minute. I can see it being helpful for some people but it breaks the way I expect the system to behave after using Macs for 30+ years.


As a user of Macs since 1984, I love that most apps now save ongoing changes and document state so that I can close most apps and restart them later with the same document reloaded and any changes automatically saved. Documents are closed when I am done with them.


Does it ever quit the app? I don't think it does.

And it never leaves the app running with no UI either, because the menu is part of the UI, and it's still running.

This is probably not obvious if you're not used to macOS, but that's a bad reason not to do things this way IMHO. It's completely obvious to me.

The red dot closes windows. All three coloured dots are window commands.

Not that I use them much, I use Moom for window sizing and Cmd-W to close windows and tab (Shift-Cmd-W to close a window full of tabs). But that's just me: the dots are there if you want to use them, and what they do is completely consistent.

You're not used to what they do, but that's not the same thing.


Some apps definitely do behave the 'closing the last window closes the app' way, although this is obviously bad from a consistency point of view.

> the menu is part of the UI

I would argue that that global menu is not part of the application's UI. True, it's application-specific, but it's very easy for a novice user to miss the context switch and just be left with the impression that the app is some kind of 'phantom'.


It's not really up for debate, the menu is part of an application's UI in macOS, that is, part of the Interface which the User uses to interact with the application. I assume you're right about a novice user, I haven't been one in many years.

That's why the name of the application is always directly to the right of the apple icon, that tells you which application is in focus, and all the menu items next to it are application-specific. The global part of the menu is just that apple icon, and the menu tray off further to the right.

Can you point me to an example of a macOS app which closes when the last window is closed? I literally can't think of one.


> It's not really up for debate

I'll let it go because it's not a very interesting debate and it's not the main point anyway. I haven't been a novice user for ~10 years, but I can still remember what it was like moving from Windows to MacOS — quite confusing!

> Can you point me to an example of a macOS app which closes when the last window is closed?

Calculator


Most apps that close when the windows closes are not document-oriented apps. For them, there is only one window and one function. The calculator app you mention is a good example. Once you close that window the app has no other purpose it is setup to auto-close the app.

Document-oriented apps expect that, after you close the document, you might want to open another one or start a new document.

Documents <> Apps


What you say makes logical sense, but I share some of the OP's frustration, and it was particularly confusing when I started using a Mac, having come from the Windows world. Heck, if we're being really logical, why isn't opening stuff the exact opposite of closing stuff? If that were true, opening a file would do nothing if its application weren't already running — and I don't think anyone wants that.


The specific use case, which I do fairly frequently, is to Cmd-W the last open window and then Cmd-N for a new document, or Cmd-O to open an existing document.

When I try that on Windows, the program closes, and I have to re-launch it. I daresay that's more annoying than discovering that a program hasn't quit when you think it should have.


Where do you type Cmd-N/Cmd-O "into" if you just closed the last open window? I am not aware of macOS continuing to give kbd focus to an application with no open windows, but maybe I just don't use macOS enough to realize that it works this way.


Focus is still on the current app’s menu, unless you’ve clicked a new window.


Well it depends on the program you are using but programs that follow a document-style layout usually allow you to close a document without quitting the program (in the File menu or Ctrl-W).

The big 'X' will always quit the program though as that's what the user would expect. Imagine Chrome/Firefox's big 'X' only closing the current tab (is that how it works on a Mac?).


Yeah, I see your point. It really was about initial expectations — now I'm used to it, it's fine, but it was incredibly confusing coming from the Windows world ("why's this application still open? i can't even 'see' it, what's it doing?")


An interesting sidebar does Mac handle swapping out applications better than Windows/Linux do? Both have a history of becoming unusable. I also suspect its more common for more expensive Mac machines to have more than minimally adequate RAM whereas many cheap machines are often sold with barely enough especially historically.

Someone who cut their teeth on other platforms may regard the death of an application with its last window as an essential part of their machine staying usable.

I don't know if you ever owned one of those really old windows ce devices but in a certain era it had the delightful workflow that closing them didn't kill them and after a while you could open as many applications as memory could hold and you would need to go into a different menu entirely to close unused applications or you couldn't open anything else. Like the worst of both worlds.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: