File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -517,19 +517,17 @@ app.on("ready", async () => {
517517 event . preventDefault ( ) ;
518518
519519 // Check if the user expects us to minimize to tray instead of quitting the app
520- const shouldMinimize = store . get ( "minimizeToTray" ) && ( tray . hasTray ( ) || process . platform === "darwin" ) ;
520+ // Two cases:
521+ // 1. On Linux/Windows, user has enabled "Show tray icon and minimise window to it on close" in settings.
522+ // 2. On Mac, the canonical behaviour is to minimize to tray; this is not configurable.
523+ const shouldMinimize = store . get ( "minimizeToTray" ) || process . platform === "darwin" ;
521524 if ( shouldMinimize ) {
522- // On Mac, closing the window just hides it
523- // (this is generally how single-window Mac apps
524- // behave, eg. Mail.app)
525-
526525 if ( global . mainWindow ?. isFullScreen ( ) ) {
527526 global . mainWindow . once ( "leave-full-screen" , ( ) => global . mainWindow ?. hide ( ) ) ;
528527 global . mainWindow . setFullScreen ( false ) ;
529528 } else {
530529 global . mainWindow ?. hide ( ) ;
531530 }
532-
533531 return ;
534532 }
535533
You can’t perform that action at this time.
0 commit comments