ELECTRON-563: fix main window close issue on macOS (#398)

This commit is contained in:
Vishwas Shashidhar 2018-06-13 18:09:32 +05:30 committed by GitHub
parent 47ac213477
commit 5ad72399cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -169,9 +169,7 @@ app.on('ready', () => {
* In which case we quit the app
*/
app.on('window-all-closed', function() {
if (!isMac) {
app.quit();
}
app.quit();
});
/**

View File

@ -288,10 +288,11 @@ function doCreateMainWindow(initialUrl, initialBounds, isCustomTitleBar) {
if (getMinimizeOnClose()) {
e.preventDefault();
mainWindow.minimize();
} else if (isMac) {
e.preventDefault();
mainWindow.hide();
} else {
if (!isMac) {
app.quit();
}
app.quit();
}
});