From 27abebcb6ba95e190f917ccca3be1cf294cdc632 Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Sat, 19 May 2018 17:01:42 +0900 Subject: [PATCH] refs #319 Quit application when window is closed --- src/main/index.js | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/src/main/index.js b/src/main/index.js index 13d71fe601..c3956d6541 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -229,29 +229,13 @@ app.commandLine.appendSwitch('disable-renderer-backgrounding') app.on('ready', createWindow) -// In macOS, this method is called when user click x button. -// When this time, streaming must stop. -// https://github.com/electron/electron/blob/master/docs/api/app.md#event-window-all-closed app.on('window-all-closed', () => { - if (userStreaming !== null) { - userStreaming.stop() - userStreaming = null - } - if (localStreaming !== null) { - localStreaming.stop() - localStreaming = null - } - if (publicStreaming !== null) { - publicStreaming.stop() - publicStreaming = null - } - if (listStreaming !== null) { - listStreaming.stop() - listStreaming = null - } - if (process.platform !== 'darwin') { - app.quit() - } + app.quit() + // This is a single-window application. + // So quit application when main window is closed. + // if (process.platform !== 'darwin') { + // app.quit() + // } }) app.on('activate', () => {