fix #1820: minimize on close on macOS

This commit is contained in:
antelle 2021-05-19 10:33:17 +02:00
parent b2d67818a8
commit f0426a3ec2
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
3 changed files with 5 additions and 2 deletions

View File

@ -191,7 +191,7 @@ const Launcher = {
}
},
quitOnRealQuitEventIfMinimizeOnQuitIsEnabled() {
return !!(this.platform() === 'darwin' || this.pendingUpdateFile);
return !!this.pendingUpdateFile;
},
minimizeApp() {
this.remoteApp().minimizeApp({

View File

@ -202,7 +202,9 @@ main.minimizeApp = function (menuItemLabels) {
if (!appIcon) {
const image = electron.nativeImage.createFromPath(path.join(__dirname, 'img', imagePath));
appIcon = new electron.Tray(image);
appIcon.on('click', restoreMainWindow);
if (process.platform !== 'darwin') {
appIcon.on('click', restoreMainWindow);
}
const contextMenu = electron.Menu.buildFromTemplate([
{ label: menuItemLabels.restore, click: restoreMainWindow },
{ label: menuItemLabels.quit, click: closeMainWindow }

View File

@ -3,6 +3,7 @@ Release notes
##### v1.18.6 (2021-05-19)
`-` fix #1824: saving KDBX3 files with compression disabled
`-` fix #1818: extension connection error if browser cannot be identified
`-` fix #1820: minimize on close on macOS
##### v1.18.5 (2021-05-14)
`-` fix #1816: old Chromium support, such as Android Edge