5 ms·
How do Windows app with zero windows work? The reason it’s doable on macOS is because the menu bar is always there.
by allenu 5y ago
How do Windows app with zero windows work? The reason it’s doable on macOS is because the menu bar is always there.
- Kwpolska 5y agoThey live in the tray, aka notification area.
- samatman 5y agoThat's not the same thing though. macOS has those also, programs can live on the menu bar. But in macOS, closing the last window basically never exits the program. Even for a program like Element, which is just an Electron view, closing the window doesn't quit the program, even though what's left over is useless: there's no way to relaunch the Electron pane except to quit and start it again. This is just how macOS works: if you want to quit, you type Cmd-Q, if you want to close windows, red button or Cmd-W, and closing windows won't quit your program.
- allenu 5y agoThere is one example of really bad app behavior when the last window is closed and it's one that Apple makes themselves: QuickTime Player. If you open up QuickTime Player and then play back a video, then close the video, as soon as you background the app, it auto-quits itself. I wonder if they made it behave this way at some point to get around a memory leak. It's such an unexpected thing and it infuriates me each time I encounter it.
- cmiller1 5y agoJust tested and QuickTime Player stayed open, not sure I've ever seen this happen.
- allenu 5y agoDid you open and play back a video first? If you just open QuickTime Player and don't interact with it, it does stay open if you switch apps. If you open a video, then close it, the app closes if you switch to a different app. I just tried it again and that's how it behaved. (I'm running Catalina still, so they may have fixed it in Big Sur.)
- cmiller1 5y agoYup. Is this a recent change? I still need to use some 32 bit programs for work so I'm on macos 10.14.6 quicktime player 10.5
- allenu 5y agoNo idea. I've seen it behave this way for at least the past year. I just tried it on a different Mac and it behaves similarly, except this other Mac causes QT to open up the File Open dialog immediately on launch. (Version 10.5 of QuickTime player for me too. macOS 10.15.7 though.)
- dragonwriter 5y ago> But in macOS, closing the last window basically never exits the program There's plenty (an increasing number, IME) of Windows apps that work that way, but mostly if an app exists to facilitate some kind of user interaction via a UI and there's no worries open there's no reason for it to be open, so no windows = closed app is a fairly same convention. > Even for a program like Element, which is just an Electron view, closing the window doesn't quit the program, even though what's left over is useless: I think that last part pretty well illustrates why “closing all windows is not closing the app”, while it make sense in many cases, is not a great model to be applied inflexibly.
- samatman 5y agoEh, I don't entirely agree. I mentioned that Element is just an Electron view because it doesn't behave like a native Mac app. The correct thing to do is to offer a menu item which would bring the view back. VLC is a good example of an app which works correctly in this way. There's only the one window, which shows either the playlist or the video. If you close it, VLC stays open, and there's a menu item which will bring it back. Of course VLC can also open files, so Cmd-O is useful here, and Element doesn't happen to support more than one window... because it's a browser view dressed as a Mac app. If it were native, it would be a no-brainer to support multiple windows, each with a given user account. So yes, there are some edge cases where an application offers exactly one window, and there's no reason to close that window instead of closing the app. But the Mac-native thing to do is to offer a menu item to bring that window back, instead of breaking consistency by having that program just disappear on you when you close the window.