Skip to content

Commit

Permalink
fix: close main window on first quit on all platforms (#661)
Browse files Browse the repository at this point in the history
* fix: close main window on first quit cleanup
  • Loading branch information
jgresham authored Sep 16, 2024
1 parent 1092cbc commit 5a0ca0d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,8 @@ app.on('before-quit', (e) => {
// monitor node's statuses and alert the user when a node is down, and to continuously
// track node usage.
e.preventDefault(); // halts electron's full quitting action
// todo: close windows?
mainWindow?.close(); // close the main window
if (process.platform === 'darwin' && app.dock) {
mainWindow?.close(); // close the main window
app.dock.hide(); // app appears "quitted" in the dock
}
}
Expand Down

0 comments on commit 5a0ca0d

Please sign in to comment.