Skip to content
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

Graceful exiting for Application #804

Merged
merged 3 commits into from
Mar 31, 2021
Merged

Graceful exiting for Application #804

merged 3 commits into from
Mar 31, 2021

Conversation

hecrj
Copy link
Member

@hecrj hecrj commented Mar 30, 2021

This PR adds support for an Application to terminate its execution gracefully.

Specifically:

  • A CloseRequested variant has been introduced to the window::Event enum.
  • The Settings struct now has an exit_on_close_request field that can be used to disable the default behavior when a close request is received.
  • The Application trait contains a new should_exit method that can be leveraged to terminate the execution at any time.

The events example has been updated to showcase all of these new additions.

Closes #801.
Fixes #170.
Fixes #226.

- `Settings` now contains an `exit_on_close_request` field
- `Application` has a new `should_exit` method
@hecrj hecrj added the feature New feature or request label Mar 30, 2021
@hecrj hecrj added this to the 0.3.0 milestone Mar 30, 2021
@hecrj hecrj merged commit b9ec444 into master Mar 31, 2021
@hecrj hecrj deleted the feature/graceful-exit branch March 31, 2021 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Close window ? Support for events when the application terminates
1 participant