소스 검색

Fix app not quitting completely on Cmd+Q (Mac)

Michael Wizner 3 년 전
부모
커밋
90f97d6669
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      app/lib/app.ts

+ 4 - 0
app/lib/app.ts

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