Skip to content

Commit 2ee3186

Browse files
committed
Quit when main window is closed
1 parent a2e3c28 commit 2ee3186

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

main/index.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,13 @@ app.on('ready', function appReady () {
215215
setTimeout(() => {
216216
autoUpdater.checkForUpdatesAndNotify()
217217
}, 500)
218+
219+
if (process.platform !== 'darwin') {
220+
// since window-all-closed doesn't fire with our hidden audio process
221+
player.win.once('closed', () => {
222+
app.quit()
223+
})
224+
}
218225
})
219226

220227
autoUpdater.on('error', (err) => {
@@ -249,10 +256,6 @@ autoUpdater.on('update-downloaded', (info) => {
249256
console.log(info)
250257
})
251258

252-
app.on('window-all-closed', function allWindowsClosed () {
253-
if (process.platform !== 'darwin') app.quit()
254-
})
255-
256259
app.on('activate', function activate () {
257260
if (player.win === null) {
258261
al.recall()

0 commit comments

Comments
 (0)