Skip to content

Graceful exiting for Application#804

Merged
hecrj merged 3 commits into
masterfrom
feature/graceful-exit
Mar 31, 2021
Merged

Graceful exiting for Application#804
hecrj merged 3 commits into
masterfrom
feature/graceful-exit

Conversation

@hecrj
Copy link
Copy Markdown
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.

hecrj added 3 commits March 30, 2021 21:33
- `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