diff --git a/src/electron/baseMenu.ts b/src/electron/baseMenu.ts index cf5676c35b..3e7e3d3c59 100644 --- a/src/electron/baseMenu.ts +++ b/src/electron/baseMenu.ts @@ -93,7 +93,7 @@ export class BaseMenu { }, { label: this.i18nService.t('close'), - role: 'quit', + role: 'close', }, ], }; diff --git a/src/electron/tray.main.ts b/src/electron/tray.main.ts index 4ae77343a1..287d233303 100644 --- a/src/electron/tray.main.ts +++ b/src/electron/tray.main.ts @@ -66,12 +66,10 @@ export class TrayMain { this.hideToTray(); } }); - } - if (process.platform === 'win32') { this.windowMain.win.on('close', async (e: Event) => { if (await this.storageService.get(ElectronConstants.enableCloseToTrayKey)) { - if(!this.windowMain.isQuitting){ + if (!this.windowMain.isQuitting) { e.preventDefault(); this.hideToTray(); }