ELECTRON-1445: fix minimise on close behaviour on macOS (#750)

This commit is contained in:
Vishwas Shashidhar 2019-07-24 00:19:02 +05:30 committed by GitHub
parent d5d59d3861
commit 5abe7805b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -244,9 +244,16 @@ export class WindowHandler {
const {minimizeOnClose} = config.getConfigFields(['minimizeOnClose']);
if (minimizeOnClose) {
event.preventDefault();
isMac ? this.mainWindow.hide() : this.mainWindow.minimize();
this.mainWindow.minimize();
return;
}
if (isMac) {
event.preventDefault();
this.mainWindow.hide();
return;
}
app.quit();
});