gpui: Move 'app closing on last window closed' behavior to app-side#41436
gpui: Move 'app closing on last window closed' behavior to app-side#41436mikayla-maki merged 2 commits intozed-industries:mainfrom
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @Tryanks on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
29b2094 to
a11b4ca
Compare
a11b4ca to
f0ac77b
Compare
mikayla-maki
left a comment
There was a problem hiding this comment.
PR looks good to me! Pretty simple implementation too :D
cc: @smitbarmase @reflectronic can you both test this on Windows and Linux and make sure it's working correctly?
f0ac77b to
7c1adb7
Compare
|
I like the approach in #36548 better. I don't think this is a reasonable default behavior for Windows or Linux. |
smitbarmase
left a comment
There was a problem hiding this comment.
Tested on Linux. Works as expected.
I agree. Another idea was to add a GPUI-level subscription for when the last window closes. If the signal has no subscribers, the platform's default behavior applies. If it has any subscribers, the default quit is prevented, letting the subscriber decide. On macOS, Zed would subscribe to this and respect the user setting. Third-party apps could subscribe and do nothing to keep running with no windows open. |
reflectronic
left a comment
There was a problem hiding this comment.
We agree that GPUI should have a default policy of exiting the app when all windows are closed on Windows and Linux, but we'd like to move this into the cross-platform layer instead of hard-coding it for each platform. This PR does some of that refactoring, so, to that end, we will accept it. In a follow-up, we will re-introduce that behavior, with an opt-out for apps like Zed that want explicit control.
|
@Tryanks if you could do a quick cargo format, we can get this merge :) |
…ed-industries#41436) This commit is a continuation of zed-industries#36548. As per [mikayla-maki's Comment](zed-industries#36548 (comment)), I removed the process management behavior located in GPUI and reimplemented it in Zed. Release Notes: - N/A --------- Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
This commit is a continuation of #36548. As per mikayla-maki's Comment, I removed the process management behavior located in GPUI and reimplemented it in Zed.
Release Notes: