Understanding macOS Behavior: Why Closing Windows Doesn’t Always Quit the App
Some Mac apps quit when the last window is closed, while others don’t. This behavior can be a bit confusing, especially for users coming from a Windows background. The choice to quit or not is often based on the nature of the application and the guidelines laid down by Apple.
Why Some Apps Quit When the Last Window is Closed
For certain types of applications, such as games, it makes sense for the entire app to quit when the last window is closed. This is because the game is designed to be played within that single window, and the app doesn’t need to be running in the background when not in use. However, for applications like email programs, word processors, and browsers, it is more practical for the app to remain running even if no windows are open. This way, the app can quickly reload and continue where it left off the next time a document is opened.
I agree with David Glasgow's answer that maintains this behavior, even if Apple doesn't always follow its own guidelines. For instance, the System Settings app from the Finder’s Apple menu behaves in a manner that closes the window and quits the app. This is in line with Apple’s user interface specifications, which generally state that apps should remain running even if no windows are open.
Historical Context and Apple’s Design Guidelines
Apple has long had precise specifications for UI design. When the Mac was introduced in the 1980s, Apple published a three-volume developer guide called “Inside Macintosh,” which eventually grew to six volumes. In addition, Apple published “Apple’s Human Interface Guidelines,” published by Addison-Wesley Publishing. Developers were encouraged to create applications with a consistent look-and-feel because users were accustomed to applications that were “Mac-like.” This consistency was important for user experience and adoption.
Windows, on the other hand, started out as a hodgepodge of utilities and programs, allowing developers to create things according to their own design aesthetics. It took many years for Windows to develop a consistent look-and-feel and user experience.
A true story from my past highlights this journey. When my former employer transitioned from a command-driven Netware environment to Windows, the original design assumed that if the user clicked the close button, the app would quit. A dialog displayed asked the user if it was “OK to cancel,” providing options for OK and Cancel. This design choice was confusing and led to a common user experience known as the “OK to Cancel” button. The lesson here is that design specifications should be carefully chosen to ensure user satisfaction.
App Behavior in macOS
The way most Mac multi-window apps have always worked is rooted in Apple’s own guidelines. Over the years, only a few applications have followed the Windows-like behavior of quitting when the last window is closed, but even these cases have faced user protests.
Apple’s logic is that if you want to quit an app, that’s what you do. If you want to close a window, that’s what you do. These actions should be distinct and clear. For macOS users, it can be a challenge to adapt to the behavior when moving between different operating systems. On Windows, closing a window without realizing it can sometimes lead to the mistaken belief that the app has crashed, requiring a re-launch. This can be frustrating and confusing, especially when switching back to macOS.
Efficiency and Consistency Across Platforms
While there are advantages and disadvantages to both systems, users can become accustomed to either behavior. However, working across different platforms can be challenging. Different applications and OS behaviors can lead to multiple apps being open and only revealed by a dedicated menu bar and icon in the dock. This can be particularly confusing for Windows users, as they are not accustomed to the app menu bar being fixed at the top of the screen.
In conclusion, the behavior of macOS apps in relation to window management and app quitting is deeply rooted in Apple’s design philosophies and user interface guidelines. Understanding these behaviors is key to navigating the macOS ecosystem effectively, whether you’re a long-time user or someone transitioning from another platform.