refs #377 Hide app when close button is clicked in mac

This commit is contained in:
AkiraFukushima 2018-07-20 22:51:44 +09:00
parent 5006c066a0
commit 4afd1de7d1
1 changed files with 5 additions and 6 deletions

View File

@ -247,12 +247,11 @@ app.commandLine.appendSwitch('disable-renderer-backgrounding')
app.on('ready', createWindow)
app.on('window-all-closed', () => {
app.quit()
// This is a single-window application.
// So quit application when main window is closed.
// if (process.platform !== 'darwin') {
// app.quit()
// }
// this action is called when user click the close button.
// In macOS, close button does not shutdown application. It is hide application window.
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', () => {