Skip to content

Commit c71680e

Browse files
committed
fix(mac): don't keep app running on Welcome/Login window close
Signed-off-by: Grigorii K. Shartsev <[email protected]>
1 parent 190c5e2 commit c71680e

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/main.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -341,20 +341,20 @@ app.whenReady().then(async () => {
341341
mainWindow.once('ready-to-show', () => mainWindow.show())
342342
}
343343
})
344-
})
345-
346-
app.on('window-all-closed', () => {
347-
// Recreating a window - keep app running
348-
if (isInWindowRelaunch) {
349-
return
350-
}
351344

352-
// On macOS, it is common for applications and their menu bar to stay active even without windows
353-
// until the user quits explicitly with Cmd + Q or Quit from the menu.
354-
if (isMac()) {
355-
return
356-
}
345+
app.on('window-all-closed', () => {
346+
// Recreating a window - keep app running
347+
if (isInWindowRelaunch) {
348+
return
349+
}
350+
// On macOS, it is common for applications and their menu bar to stay active even without windows
351+
// until the user quits explicitly with Cmd + Q or Quit from the menu.
352+
// However, it makes sense only for the Talk window and not for Authentication or Welcome windows.
353+
if (isMac() && createMainWindow === createTalkWindow) {
354+
return
355+
}
356+
// All the windows are closed - quit the app
357+
app.quit()
358+
})
357359

358-
// All the windows are closed - quit the app
359-
app.quit()
360360
})

0 commit comments

Comments
 (0)