<?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/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Lazarus Pascal - macOS - Form does not close on quit application - Delphi, Lazarus, Free Pascal				            </title>
            <link>https://www.tweaking4all.com/forum/delphi-lazarus-free-pascal/lazarus-pascal-macos-form-does-not-close-on-quit-application/</link>
            <description>Tweaking4All.com Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Tue, 21 Jul 2026 02:07:44 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>Lazarus Pascal - macOS - Form does not close on quit application</title>
                        <link>https://www.tweaking4all.com/forum/delphi-lazarus-free-pascal/lazarus-pascal-macos-form-does-not-close-on-quit-application/#post-4501</link>
                        <pubDate>Wed, 26 Oct 2022 13:41:12 +0000</pubDate>
                        <description><![CDATA[I&#039;ve encountered this in several of my Cocoa apps (Intel and Arm64): Close the application doesn&#039;t close the main form until it has focus.
This happens for example when the said form or app...]]></description>
                        <content:encoded><![CDATA[<p>I've encountered this in several of my Cocoa apps (Intel and Arm64): Close the application doesn't close the main form until it has focus.</p>
<p>This happens for example when the said form or application does not have focus, and you're trying to terminate the application by right clicking the Dock icon and selecting "Quit". The form will not close until it gets focus again. </p>
<p>I have had a friend report the same thing when programmatically closing a form that did not have focus.</p>
<p>The FormClose event does get fired, but the form still does not close.</p>
<p><a href="https://forum.lazarus.freepascal.org/index.php?topic=61029" target="_blank" rel="noopener"><strong>KodeZwerg</strong> in the Lazarus Forum</a> (thanks 👍😎) helped finding the fix, by simply adding "<strong>self.show;</strong>" to the FormClose event.</p>
<pre contenteditable="false">procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
  Self.Show;
end;</pre>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/delphi-lazarus-free-pascal/">Delphi, Lazarus, Free Pascal</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/delphi-lazarus-free-pascal/lazarus-pascal-macos-form-does-not-close-on-quit-application/#post-4501</guid>
                    </item>
							        </channel>
        </rss>
		