bevyengine / bevyengine/bevy

Quitting on MacOS fails to trigger an AppExit event

Open
#9,499 9 comments 1 reaction 0 assignees View on GitHub
A-Windowing C-Bug C-Docs
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

0.11.0

## Relevant system information

This is a MacOS bug.

## What you did

I quit the application with the keyboard shortcut "Command+q".

## What went wrong

I was expecting it to end the program gracefully, trigger an AppExit event, and call the implemented Drop functions for the components that I set up.

It actually just ends the application's process without any of this cleanup functionality having an opportunity to run. It works as expected when I close the primary window or trigger the AppExit event myself, but not when I call the application's Quit menu item.

## Additional information

Ideally, quitting the application through the application menu would simply fire the AppExit event instead of immediately ending the process. If this isn't feasible for some reason, maybe there should be an option to disable the quit menu item or at least trigger a prompt that warns users of potentially losing unsaved data before actually exiting.

I suppose you could think of this as a feature, but this is a common way to exit applications on MacOS and users will perceive it as a bug if the game is expected to have any kind of auto save functionality.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.