I created SmartClose because, recently, There are many new macos users arround and My self also switching between Windows and macOs too often, and I find it really annoying that when I click the red close button on the last window of an app, the app doesn't quit. So I made SmartClose to fix this issue.
** Basic idea: If you click the red close button on the last normal window of an app, SmartClose politely quits the app. If there are multiple windows, it just closes the one you clicked. If anything is ambiguous, it does nothing. **
SmartClose is a macOS menu bar utility that makes the red close button behave more like Windows. When you close the last normal window of an app, SmartClose politely quits the app. If there are multiple windows, it only closes the one you clicked.
SmartClose is conservative by design. If anything is ambiguous, inaccessible, or potentially unsafe, it passes the close through instead of forcing behavior.
On macOS, clicking the red close button usually closes a window but keeps the app running. That is native behavior, but it feels inconsistent if you switch between Windows and macOS frequently or expect single-window apps to quit when their last window closes.
- If the app has more than one normal window, SmartClose leaves the close behavior alone.
- If the app has exactly one normal window, SmartClose requests a normal quit.
- If anything is ambiguous or inaccessible, SmartClose does nothing.
- SmartClose only acts when it can reliably inspect windows through Accessibility APIs.
- If required permissions are missing, SmartClose stays disabled.
- It does not use pixel color detection or coordinate heuristics.
- It never force-quits apps.
- macOS 13.0 or later
- Accessibility permission
- Input Monitoring permission
- Download the latest
SmartClose-<version>.dmgfrom GitHub Releases. - Open the disk image and drag
SmartClose.appintoApplications. - Launch SmartClose from
Applications. - Complete onboarding and grant the requested permissions.
Each release also includes a notarized ZIP of the same app bundle and a SHA-256 checksum file.
- Open SmartClose.xcodeproj in Xcode.
- Select the
SmartClosescheme. - Build and run.
- Ignore list and allow list with
*wildcard support - Per-app policies: default, always normal close, always quit on last window, disabled
- Hidden and minimized window handling toggles
- Pause mode
- Launch at login
SmartClose uses macOS Accessibility APIs to detect the close action and inspect windows, plus Input Monitoring to receive the global close-button click.
Detailed permission notes live in docs/permissions.md.
Release and notarization steps live in docs/release.md.
The repository includes:
- scripts/release_local.sh for local signed and notarized builds
- scripts/create_dmg.sh for DMG packaging
- release.yml for GitHub Actions releases
- Accessibility and Input Monitoring are both required.
- Some apps expose windows in non-standard ways.
- Electron or custom windowing toolkits may behave differently.
- Behavior can vary across third-party macOS apps with unusual window lifecycles.
- The Mac App Store is not a good fit for this permission model.
All logic runs locally on your Mac. SmartClose does not send telemetry by default.