-
Notifications
You must be signed in to change notification settings - Fork 6.5k
gpui: Allow the application to run after all windows are closed #36548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @Guibi1 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! |
|
I’m curious why do you need this feature? AFAIK, on Windows pretty much all apps exit once the window is closed, unless they’ve got a tray icon like Steam. |
|
Exactly. Currently its impossible to do a system tray without running another event loop outside of gpui and doing an |
|
I found a way to add a tray icon if thats what you are looking for... however, exposing the event loop + adding a bunch more configurable options is needed (such as setting window visibility) |
…g when no windows are open
…windows are closed
…windows are closed
…windows are closed
…windows are closed
|
Hello! I think a better fix would be to remove the behavior from the GPUI platform entirely, so that all applications stay running after the last window is closed. Then we can re-implement this at the application level. |
…41436) This commit is a continuation of #36548. As per [mikayla-maki's Comment](#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 <[email protected]>
|
I came here from search. For completness, here is example how to turn the feature on. This is not released in crates (version 0.2.2) yet, but it works like this in the branch. Application::new()
.with_quit_mode(QuitMode::Explicit)or Application::new().run(|cx: &mut App| {
cx.set_quit_mode(QuitMode::Explicit); |
…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 <[email protected]>
This PR adds the option to prevent the event loop from exiting when the last window is closed by the user.
This is needs more thought because:
Release Notes: