Skip to content

Commit

Permalink
fix(mac): don't keep app running on Welcome/Login window close
Browse files Browse the repository at this point in the history
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
  • Loading branch information
ShGKme committed Nov 20, 2024
1 parent 281a7bf commit 9a20a0c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,20 +341,20 @@ app.whenReady().then(async () => {
mainWindow.once('ready-to-show', () => mainWindow.show())
}
})
})

app.on('window-all-closed', () => {
// Recreating a window - keep app running
if (isInWindowRelaunch) {
return
}

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

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

0 comments on commit 9a20a0c

Please sign in to comment.