Merge pull request #137 from kPherox/macos-quit-window-all-closed

Change to quit when window all closed in macOS
This commit is contained in:
Cutls 2019-10-09 15:22:21 +09:00 committed by GitHub
commit c400cc317d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();
}
});
function createWindow() {