fix(single-instance): quit when the lock is lost
requestSingleInstanceLock() without a quit on failure means the second process falls through to whenReady() and opens a duplicate window (what Avi saw: two Folios from one icon click). Now the loser forwards to the running window (second-instance) and exits. Pairs with the launcher TMPDIR pin — uwsm per-scope /tmp made the singleton socket invisible, so the lock never even failed before.
This commit is contained in:
parent
44b4737a20
commit
ced074a3a0
1 changed files with 4 additions and 0 deletions
|
|
@ -1423,4 +1423,8 @@ if (app.requestSingleInstanceLock()) {
|
|||
}
|
||||
if (f) openFromArg(f);
|
||||
});
|
||||
} else {
|
||||
// Lost the lock: another Folio is already running. Without this quit the
|
||||
// second process falls through to whenReady() and opens a duplicate window.
|
||||
app.quit();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue