Merge pull request #5743 from mwz/quit-app-cmd-q-mac-take2

This commit is contained in:
Eugeny 2022-02-13 19:51:33 +01:00 committed by GitHub
commit 0180fb0134
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,6 +93,10 @@ export class Application {
app.commandLine.appendSwitch(flag[0], flag[1]) app.commandLine.appendSwitch(flag[0], flag[1])
} }
app.on('before-quit', () => {
this.quitRequested = true
})
app.on('window-all-closed', () => { app.on('window-all-closed', () => {
if (this.quitRequested || process.platform !== 'darwin') { if (this.quitRequested || process.platform !== 'darwin') {
app.quit() app.quit()