fix(win): Windows stability improvements (#207) (#208)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Haze <hazeone@users.noreply.github.com>
This commit is contained in:
Haze
2026-02-27 22:10:35 +08:00
committed by GitHub
Unverified
parent 0fb1a1a78d
commit 386d4c5454
14 changed files with 754 additions and 871 deletions

View File

@@ -1,5 +1,18 @@
export let isQuitting = false;
/**
* Application quit state.
*
* Exposed as a function accessor (not a bare `export let`) so that every
* import site reads the *live* value. With `export let`, bundlers that
* compile to CJS may snapshot the variable at import time, causing
* `isQuitting` to stay `false` forever and preventing the window from
* closing on Windows/Linux.
*/
let _isQuitting = false;
export function isQuitting(): boolean {
return _isQuitting;
}
export function setQuitting(value = true): void {
isQuitting = value;
_isQuitting = value;
}