Change to quit when window all closed in macOS

This commit is contained in:
kPherox 2019-10-08 23:51:32 +09:00
parent 44ccd111b2
commit d933eef8cc
No known key found for this signature in database
GPG Key ID: C04751C2BFA2F62D

View File

@ -99,16 +99,8 @@ function isFile(file) {
}
// 全てのウィンドウが閉じたら終了
app.on('window-all-closed', function () {
if (process.platform != 'darwin') {
electron.session.defaultSession.clearCache(() => { })
app.quit();
}
});
// macOSでウィンドウを閉じた後に再度開けるようにする
app.on('activate', function () {
if (mainWindow == null) {
createWindow();
}
electron.session.defaultSession.clearCache(() => { })
app.quit();
});
function createWindow() {