Repository navigation
Releases: nhatnam7kz/TrueClose
Release list
v1.2.2: skip unnecessary permission and fullscreen checks
- Skip Screen Recording permission checks after the state is known
- Only check fullscreen transitions when zero-window apps require auto-quit evaluation
- Avoid repeated TCC XPC calls on the main thread
- Reduce unnecessary AX work on the background queue
v1.2.1: Fix and optimize code
v1.2.0: fix(monitor): eliminate Electron/Chromium zombie windows blocking auto-quit
Fix(monitor): eliminate Electron/Chromium zombie windows blocking auto-quit
- Gate cross-space keep-alive checks with kAXMainWindowAttribute verification
- Accurately differentiate hidden (orderOut:) windows from windows on inactive Spaces
- Eliminate false positives across both ScreenCaptureKit and CGWindowList fallback paths
- Keep window tracking non-blocking and memory-safe
v1.1.0: Fix apps wrongly auto-quit across Desktop/Space switches
Fixes several related bugs where apps got auto-quit even though they
were still genuinely open, all caused by Accessibility misreporting
window counts during Space transitions:
- Entering native fullscreen (green button) then alt-tabbing away
could cause the fullscreened app itself to be quit, since AX loses
visibility into windows once their Space isn't the active one. - Creating a new Desktop (trackpad swipe) could cause apps on the
Desktop being left behind to be quit, for the same reason.
Fix:
- Track apps that have ever gone fullscreen; once seen, their "0
windows" readings are distrusted until confirmed otherwise by
actually seeing a normal window again. - Pause all auto-quit decisions during any active-Space change
(covers plain Desktop switching, not just fullscreen), with a
settle buffer for slower transitions. - Add an optional Screen Recording permission (Settings >
Accessibility tab) that lets TrueClose cross-check window counts
via CGWindowList, which — unlike Accessibility — can see windows
across all Desktops/Spaces. When granted, this is the deciding
factor before any app is quit for having "0 windows", eliminating
false positives caused by the app simply being on another Desktop.
v1.0.3: Add .pkg file and fix apps incorrectly auto-quit after system sleep/wake
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.
v1.0.2: Fix false auto-quit others app when using fullscreen app
Cross-check window count with CGWindowList before quitting, since AX API can misreport 0 windows during heavy system load or fullscreen games
v1.0.1 - Fix: minimized windows counted as closed
Previously a minimized window was excluded from the window count, causing apps to be auto-quit if the user minimized instead of closing. Now all AXWindow-role windows count as open regardless of minimized state.