Set automatic termination programatically (fix #1183)

This commit is contained in:
1024jp 2021-06-02 12:59:16 +09:00
parent 8decd3396f
commit ff45fe7349
2 changed files with 8 additions and 0 deletions

View File

@ -5,6 +5,10 @@ Change Log
4.0.5 (unreleased)
--------------------------
### Fixes
- Fix an issue that the application did not terminate when all windows are closed.
4.0.4 (461)

View File

@ -86,6 +86,10 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
UserDefaults.standard.register(defaults: defaults)
NSUserDefaultsController.shared.initialValues = defaults
// -> Setting `NSSupportsAutomaticTermination` in Info.plist
// doesn't work somehow (2021-06)
ProcessInfo.processInfo.automaticTerminationSupportEnabled = true
// instantiate shared instances
_ = DocumentController.shared
_ = TextFinder.shared