Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

J.Gallardo

macrumors 6502
Original poster
Apr 4, 2017
448
157
Spain
I use macs since 20 or more years ago. Closing a window was just that, and the app used to keep open. Things changed. OK, not too inconvenient, I got used to find different behavior per app. A little confusing, but one could get used quickly, and I think it was made with some logic behind: closing Safari‘s main window didn’t close the app, closing App Store window terminated the app. Well, I can understand.

BUT: in last Monterey version (12.4) … suddenly the Stocks app doesn’t close with the window, for fist time in system. What for? Also: Preview app is terminated if you close an only window opened, so you have to open it again for next document you open. And this begun in 12.4 also. I feel as there’s not logic anymore about closing window/app. I wonder if someone can point to a reason for this, or if you think -like me- that this seems just capricious or a bad joke.
Perhaps Apple is trying to make opening and closing apps a more iOS-like thing? (…This is not a serious way to train us, I think).

Well: with fast cpu’s this is becoming irrelevant, perhaps. But, specially with Preview, I think it’s a regression. When I work for a couple hours with pdfs et others at job, I have to reopen Preview a dozen times! (I know I could leave a minimized open window to fix this, yes).
Just curiosity: is there a terminal command or an app to choose and set app behavior when closing last window?
 
  • Like
Reactions: bwillwall

elptdbi3lYI

macrumors 6502
Mar 26, 2021
320
275
By default applications do not close after last window closes, but developer can decide to implement two of the ways you have mentioned:
1. Implements https://developer.apple.com/documen...gate/1428381-applicationshouldterminateafterl and returns true.
2. Includes https://developer.apple.com/documen...ion_property_list/nssupportssuddentermination key in Info.plist with value set to YES.

Preview.app closes because of the second point, this behaviour can be changed with:
Code:
defaults write -g NSDisableAutomaticTermination -bool true
I am not aware if it's possible to change behaviour of the first point besides swizzling.
 

Diskutant

macrumors 6502
Jun 1, 2019
431
430
Preview doesn't quit when closing the last window.
But what happens is, if you are low on memory, apps with no open window will quit, and this includes preview. But it's a behavior since 10.9 or something like that.
 
  • Like
Reactions: chabig

Mr.Blacky

Cancelled
Jul 31, 2016
1,880
2,583
Preview doesn't quit when closing the last window.
But what happens is, if you are low on memory, apps with no open window will quit, and this includes preview. But it's a behavior since 10.9 or something like that.
If I close all windows in Preview and switch to another app, Preview will quit even though there is more than enough memory available.
 

Diskutant

macrumors 6502
Jun 1, 2019
431
430
If I close all windows in Preview and switch to another app, Preview will quit even though there is more than enough memory available.
In 10.9 on a 2012 MBP retina it did exactly that for me too. But now in macOS 12.4 on my Mac Studio with 32GB RAM Preview stays open with no windows open. What are your OS and HW specs?
 

Mr.Blacky

Cancelled
Jul 31, 2016
1,880
2,583
In 10.9 on a 2012 MBP retina it did exactly that for me too. But now in macOS 12.4 on my Mac Studio with 32GB RAM Preview stays open with no windows open. What are your OS and HW specs?
Mid-range iMac M1 - standard configuration - latest macOS
 

J.Gallardo

macrumors 6502
Original poster
Apr 4, 2017
448
157
Spain
Preview doesn't quit when closing the last window.
But what happens is, if you are low on memory, apps with no open window will quit, and this includes preview. But it's a behavior since 10.9 or something like that.
That would be an easy to understand rule. But it doesn’t work so.
Watch “Sound MIDI config.” app (don’t remember exact name). I have to use it now and then to set ext. dac resolution. It stays open forever after closing all windows. (Perhaps I have “too much” RAM).

I don’t feel it’s a big issue… but find it confusing and not thought with an intention. I repeat glaring example: Apple “Stocks” app always closed with window; not now. It’s not a bug, it’s not important… Perhaps we’re getting trained for iOS way to handle apps?
 

6916494

Cancelled
Jun 16, 2022
105
157
... closing Safari‘s main window didn’t close the app, closing App Store window terminated the app.
Usually apps, which can have more than one window, stay open after closing the last one. And apps, which only have one window, will close after closing that window.

Single window apps do not have a "New Window" menu and no keyboard shortcut Cmd-N to create a new window.

But some apps do not follow that rule, for example "Books.app".
 
Last edited:

stevenaaus

macrumors member
Oct 23, 2013
61
41
A little confusing, but one could get used quickly, and I think it was made with some logic behind: closing Safari‘s main window didn’t close the app, closing App Store window terminated the app.

This^! Once upon a time Apple used to have extensive UI guidelines to make everything familiar and nicely behaved. Then the rot/money kicked in, and now they can't even have a standard Close App or Maximise button. It really annoys me, and disgraceful imho. ... But sorry i can't help. ;)
 

Chancha

macrumors 68020
Mar 19, 2014
2,246
2,043
Apple started breaking the 2-step quit behaviour ever since they started shipping single-window, single purpose apps. IIRC it was iPhoto that began the "click red button and it is totally gone" logic that is expected by normies. But at the same time, similar class of apps like iTunes wouldn't ever quit unless you told it to, because people expected it to play music in the background so Apple kept it that way.

Not saying I am bothered too much by it but indeed it is really inconsistent that we are already used to being surprised by one result or the other. It used to be much more annoying when the OS-wide "re-open all windows or files you didn't really close last time" API hadn't existed.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.