mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Fix restart behavior for "Restart and Install Update" on macOS
This commit is contained in:
@@ -91,6 +91,7 @@ class AtomApplication extends EventEmitter {
|
||||
constructor (options) {
|
||||
super()
|
||||
this.quitting = false
|
||||
this.quittingForUpdate = false
|
||||
this.getAllWindows = this.getAllWindows.bind(this)
|
||||
this.getLastFocusedWindow = this.getLastFocusedWindow.bind(this)
|
||||
this.resourcePath = options.resourcePath
|
||||
@@ -384,6 +385,7 @@ class AtomApplication extends EventEmitter {
|
||||
|
||||
this.on('application:install-update', () => {
|
||||
this.quitting = true
|
||||
this.quittingForUpdate = true
|
||||
this.autoUpdateManager.install()
|
||||
})
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ class AtomWindow extends EventEmitter {
|
||||
|
||||
handleEvents () {
|
||||
this.browserWindow.on('close', async event => {
|
||||
if (!this.atomApplication.quitting && !this.unloading) {
|
||||
if ((!this.atomApplication.quitting || this.atomApplication.quittingForUpdate) && !this.unloading) {
|
||||
event.preventDefault()
|
||||
this.unloading = true
|
||||
this.atomApplication.saveCurrentWindowOptions(false)
|
||||
|
||||
Reference in New Issue
Block a user