Skip to content

Add QuitMode policy to GPUI#42391

Merged
reflectronic merged 1 commit intozed-industries:mainfrom
reflectronic:shutdown-mode
Nov 10, 2025
Merged

Add QuitMode policy to GPUI#42391
reflectronic merged 1 commit intozed-industries:mainfrom
reflectronic:shutdown-mode

Conversation

@reflectronic
Copy link
Member

Applications can select a policy for when the app quits using the new function Application::with_quit_mode:

  • Only on explicit calls to App::quit
  • When the last window is closed
  • Platform default (former on macOS, latter everywhere else)

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 10, 2025
@reflectronic reflectronic merged commit 112b5c1 into zed-industries:main Nov 10, 2025
25 checks passed
MrSubidubi added a commit that referenced this pull request Nov 19, 2025
Follow-up to #42391

Release Notes:

- Fixed an issue where Zed did not respect the `on_last_window_closed`
setting on macOS
github-actions bot pushed a commit that referenced this pull request Nov 19, 2025
Follow-up to #42391

Release Notes:

- Fixed an issue where Zed did not respect the `on_last_window_closed`
setting on macOS
zed-zippy bot added a commit that referenced this pull request Nov 19, 2025
…ck to preview) (#43062)

Cherry-pick of #43058 to preview

----
Follow-up to #42391

Release Notes:

- Fixed an issue where Zed did not respect the `on_last_window_closed`
setting on macOS

Co-authored-by: Finn Evers <finn@zed.dev>
mikayla-maki pushed a commit that referenced this pull request Nov 20, 2025
Follow-up to #42391

Release Notes:

- Fixed an issue where Zed did not respect the `on_last_window_closed`
setting on macOS
@jbirnick
Copy link

@reflectronic May I ask why the default quit mode is different for MacOS?

Doesn't that mean that when I leave the quit mode as Default, the behavior of my program will differ between the platforms? I.e., when I write a cross-platform app, I'm forced to set a quit mode anyway?

@reflectronic
Copy link
Member Author

May I ask why the default quit mode is different for MacOS?

I think the expectation for many types of apps on macOS is that they only exit when the user runs the "Quit" command.

This was also the behavior in GPUI before the refactoring in #41436. This patch is just restoring the existing behavior.

11happy pushed a commit to 11happy/zed that referenced this pull request Dec 1, 2025
Applications can select a policy for when the app quits using the new
function `Application::with_quit_mode`:
- Only on explicit calls to `App::quit`
- When the last window is closed
- Platform default (former on macOS, latter everywhere else) 

Release Notes:

- N/A
11happy pushed a commit to 11happy/zed that referenced this pull request Dec 1, 2025
Follow-up to zed-industries#42391

Release Notes:

- Fixed an issue where Zed did not respect the `on_last_window_closed`
setting on macOS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants