Add support for graceful exits in Application
- `Settings` now contains an `exit_on_close_request` field - `Application` has a new `should_exit` method
This commit is contained in:
parent
00de9d0c9b
commit
67db13ff7c
5 changed files with 57 additions and 9 deletions
|
|
@ -23,6 +23,10 @@ pub struct Settings<Flags> {
|
|||
///
|
||||
/// [`Application`]: crate::Application
|
||||
pub flags: Flags,
|
||||
|
||||
/// Whether the [`Application`] should exit when the user requests the
|
||||
/// window to close (e.g. the user presses the close button).
|
||||
pub exit_on_close_request: bool,
|
||||
}
|
||||
|
||||
/// The window settings of an application.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue