CMD + Q does not behave the same as closing the window with the X button (macOS)
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version
0.16
## What you did
I noticed that closing the application by clicking the "X" button will correctly terminate it and my autosave_on_exit function is called:
```rust
.add_systems(Last, autosave_on_exit)
```
## What went wrong
but when i do "CMD+Q" it will just kill the application (no errors) and the `autosave_on_exit` is never called.
I would expect the same behavior for "CMD+Q" as for closing the window/application.
## Additional information
Tested on macOS.
Created a new issue as requested in #17307
Contributor guide
Research direction
Start from the reported autosave_on_exit system registered in Last and inspect Bevy's macOS window and application-close handling. Reproduce CMD+Q versus clicking the window close control on macOS, then verify that autosave_on_exit runs for both paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100