Skip to content

v1.0.3: Add .pkg file and fix apps incorrectly auto-quit after system sleep/wake

Choose a tag to compare

@nhatnam7kz nhatnam7kz released this 12 Sep 18:21
· 8 commits to main since this release

Fix: Apps incorrectly auto-quit after system sleep/wake
Bug

After the Mac wakes from sleep, apps that were genuinely still open with windows would sometimes get auto-quit by TrueClose, even though the user never closed them.

Root cause
Right before the system sleeps, some apps can briefly report "0 windows" even though they're still open — this starts TrueClose's quit countdown for that app.
While the Mac is asleep, the countdown timer is paused, but real time keeps passing in the background.
The moment the Mac wakes up, TrueClose checks how much time has passed since the countdown started — since the Mac may have slept for hours, this looks like way more than enough time has passed, so the app gets quit instantly and incorrectly.
Fix
Added listeners for the system's sleep and wake events.
While the Mac is sleeping (or about to sleep), TrueClose now pauses all auto-quit checks entirely.
The moment the Mac wakes up, all pending quit countdowns are cleared and start fresh — so no app gets quit based on a stale timer that doesn't reflect what actually happened while the Mac was asleep.
Result

Apps are no longer incorrectly closed after sleep/wake. The auto-quit feature still works normally otherwise — it just restarts its timing cleanly after every sleep cycle instead of carrying over inaccurate data.