refactor(app-lifecycle): invert window-all-closed for clearer macOS intent
This commit is contained in:
1 parent
2eb6cb2c06
commit
1ccf31f6d7
1 file changed
+5
-4
@@ -44,11 +44,12 @@ export function createAppLifecycleService({
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.on("window-all-closed", () => {
|
app.on("window-all-closed", () => {
|
||||||
// On macOS, keep the app running when all windows are closed (standard behavior)
|
// macOS keeps the app alive when all windows close (standard platform behavior),
|
||||||
// UNLESS the user explicitly chose Quit (before-quit already fired).
|
// except after the user picked Quit (before-quit already fired -> shouldQuit()).
|
||||||
if (process.platform !== "darwin" || shouldQuit()) {
|
if (process.platform === "darwin" && !shouldQuit()) {
|
||||||
app.quit();
|
return;
|
||||||
}
|
}
|
||||||
|
app.quit();
|
||||||
});
|
});
|
||||||
|
|
||||||
app.on("before-quit", () => {
|
app.on("before-quit", () => {
|
||||||
|
|||||||
Reference in new issue
Block a user