Merge pull request #11309 from vector-im/t3chguy/hotfix_macos_1.5.1

Fix close window behaviour on Macos
pull/11312/head
David Baker 2019-11-04 18:22:16 +00:00 committed by GitHub
commit d1d626fb6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -393,7 +393,7 @@ app.on('ready', () => {
}); });
mainWindow.on('close', (e) => { mainWindow.on('close', (e) => {
// If we are not quitting and have a tray icon then minimize to tray // If we are not quitting and have a tray icon then minimize to tray
if (!global.appQuitting && tray.hasTray()) { if (!global.appQuitting && (tray.hasTray() || process.platform === 'darwin')) {
// On Mac, closing the window just hides it // On Mac, closing the window just hides it
// (this is generally how single-window Mac apps // (this is generally how single-window Mac apps
// behave, eg. Mail.app) // behave, eg. Mail.app)