diff --git a/src/main-process/appWindow.ts b/src/main-process/appWindow.ts index 4249b16a..55c198b8 100644 --- a/src/main-process/appWindow.ts +++ b/src/main-process/appWindow.ts @@ -87,8 +87,6 @@ export class AppWindow { public onClose(callback: () => void): void { this.window.on('close', () => { callback(); - // Currently, the application quits when the window is closed for all operating systems. - app.quit(); }); } diff --git a/src/main.ts b/src/main.ts index 2b5da751..eb307bc4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -66,6 +66,10 @@ if (!gotTheLock) { log.debug('App ready'); const appWindow = new AppWindow(); + appWindow.onClose(() => { + log.info('App window closed. Quitting application.'); + app.quit(); + }); // Register basic handlers that are necessary during app's installation. new PathHandlers().registerHandlers();