<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nhất Nam Hoàng</title>
    <description>The latest articles on DEV Community by Nhất Nam Hoàng (@nhatnam7kz).</description>
    <link>https://dev.to/nhatnam7kz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4172356%2Fe46ee595-9666-480a-a8e9-0fe25be22263.png</url>
      <title>DEV Community: Nhất Nam Hoàng</title>
      <link>https://dev.to/nhatnam7kz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nhatnam7kz"/>
    <language>en</language>
    <item>
      <title>Why Your Mac App Keeps Running After You Close the Window (and How I Fixed It)</title>
      <dc:creator>Nhất Nam Hoàng</dc:creator>
      <pubDate>Fri, 09 Oct 2026 03:10:15 +0000</pubDate>
      <link>https://dev.to/nhatnam7kz/why-your-mac-app-keeps-running-after-you-close-the-window-and-how-i-fixed-it-hmo</link>
      <guid>https://dev.to/nhatnam7kz/why-your-mac-app-keeps-running-after-you-close-the-window-and-how-i-fixed-it-hmo</guid>
      <description>&lt;p&gt;If you came from Windows, you've probably noticed this: you click the red close button, the window disappears, but the app is &lt;strong&gt;still running&lt;/strong&gt;. There's a small dot under its icon in the Dock, and it keeps using memory until you press &lt;code&gt;Cmd + Q&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;On Windows, closing the last window quits the program. On macOS it doesn't. I wanted that Windows behavior on my Mac, so I built &lt;strong&gt;TrueClose&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvuv75x2mg9p7bfg8zs6m.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvuv75x2mg9p7bfg8zs6m.gif" alt="TrueClose demo: closing the last window quits the app" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Does closing a window quit the app on Mac?
&lt;/h2&gt;

&lt;p&gt;No. By default, the red close button only closes the window. The app stays open in the background, keeps its place in the Dock, and keeps using RAM. Apple designed it this way so apps can reopen instantly, but if you never use that, it's just clutter.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is TrueClose?
&lt;/h2&gt;

&lt;p&gt;TrueClose is a small, free, open-source menu bar app for macOS. When you close an app's last window, it quits the app after a short delay.&lt;/p&gt;

&lt;p&gt;Features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Adjustable delay (0.2–5 seconds):&lt;/strong&gt; so closing one window right before opening another doesn't quit the app by mistake&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blacklist or Whitelist mode:&lt;/strong&gt; keep music players and menu bar tools running, or only auto-quit the apps you choose&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Protected system apps:&lt;/strong&gt; Finder, System Settings, Activity Monitor and similar apps are on the default blacklist, with a warning if you change that&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pause/Resume&lt;/strong&gt; from the menu bar, launch at login, and an option to hide the menu bar icon (reopen Settings with ⌥⇧A)&lt;/li&gt;
&lt;li&gt;Free, MIT licensed, no telemetry&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdmj30tpvx8m7hwr54x9g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdmj30tpvx8m7hwr54x9g.png" alt="TrueClose settings window" width="800" height="735"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How does it work?
&lt;/h2&gt;

&lt;p&gt;TrueClose uses the macOS &lt;strong&gt;Accessibility API&lt;/strong&gt; to count how many windows each running app has. When an app drops to zero windows, TrueClose starts a timer. If the app still has no windows when the delay ends, TrueClose asks it to quit with &lt;code&gt;NSRunningApplication.terminate()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That call is a normal quit request, the same as pressing &lt;code&gt;Cmd + Q&lt;/code&gt;. Apps can still ask about unsaved changes instead of being force-killed. If an app doesn't quit, TrueClose tries again on the next check.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;p&gt;With Homebrew:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--cask&lt;/span&gt; nhatnam7kz/tap/trueclose
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or download the &lt;code&gt;.pkg&lt;/code&gt; / &lt;code&gt;.dmg&lt;/code&gt; from the &lt;a href="https://github.com/nhatnam7kz/TrueClose/releases/latest" rel="noopener noreferrer"&gt;Releases page&lt;/a&gt;. TrueClose isn't signed with a paid Apple certificate, so macOS may block it on first launch. Run this once to clear it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;xattr &lt;span class="nt"&gt;-d&lt;/span&gt; com.apple.quarantine /Applications/TrueClose.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open the app and grant &lt;strong&gt;Accessibility&lt;/strong&gt; access in System Settings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Looking for a Swift Quit or RedQuits alternative?
&lt;/h2&gt;

&lt;p&gt;Older tools like Swift Quit and RedQuits do a similar job, but they haven't had recent updates, and RedQuits 2.0 is Intel-only. If you want something newer with a configurable delay, separate blacklist/whitelist modes and a pause switch, TrueClose is built for that.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Website: &lt;a href="https://trueclose.hoangnhatnamiq.workers.dev/" rel="noopener noreferrer"&gt;https://trueclose.hoangnhatnamiq.workers.dev/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/nhatnam7kz/TrueClose" rel="noopener noreferrer"&gt;https://github.com/nhatnam7kz/TrueClose&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'd love feedback: which apps refuse to quit, or quit when they shouldn't? Would you like per-app delays or a notification before quitting? Leave a comment or open an issue on GitHub.&lt;/p&gt;

</description>
      <category>macos</category>
      <category>opensource</category>
      <category>swift</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
