Merge pull request #949 from feross/f/state

State cleanup, rename, & tweaks
This commit is contained in:
Feross Aboukhadijeh
2016-09-22 23:41:01 +02:00
committed by GitHub
8 changed files with 25 additions and 32 deletions

View File

@@ -107,12 +107,12 @@ function init () {
app.isQuitting = true
e.preventDefault()
windows.main.dispatch('saveState') // try to save state on exit
ipcMain.once('savedState', () => app.quit())
windows.main.dispatch('stateSaveImmediate') // try to save state on exit
ipcMain.once('stateSaved', () => app.quit())
setTimeout(() => {
console.error('Saving state took too long. Quitting.')
app.quit()
}, 2000) // quit after 2 secs, at most
}, 4000) // quit after 4 secs, at most
})
app.on('activate', function () {