add window visibility
This commit is contained in:
parent
3ea2c4595a
commit
cdab8f90fb
4 changed files with 34 additions and 1 deletions
|
|
@ -191,6 +191,13 @@ pub trait Application: Sized {
|
|||
false
|
||||
}
|
||||
|
||||
/// Returns whether the [`Application`] should be visible or not
|
||||
///
|
||||
/// By default, it returns `true`.
|
||||
fn visible(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
/// Runs the [`Application`].
|
||||
///
|
||||
/// On native platforms, this method will take control of the current thread
|
||||
|
|
@ -295,6 +302,10 @@ where
|
|||
fn should_exit(&self) -> bool {
|
||||
self.0.should_exit()
|
||||
}
|
||||
|
||||
fn visible(&self) -> bool {
|
||||
self.0.visible()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue