summaryrefslogtreecommitdiffstats
path: root/winit/src/application.rs
diff options
context:
space:
mode:
Diffstat (limited to 'winit/src/application.rs')
-rw-r--r--winit/src/application.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs
index 106d5218..e73f3df1 100644
--- a/winit/src/application.rs
+++ b/winit/src/application.rs
@@ -98,6 +98,13 @@ pub trait Application: Program<Clipboard = Clipboard> {
fn should_exit(&self) -> bool {
false
}
+
+ /// Returns whether the [`Application`] should be visible or not
+ ///
+ /// By default, it returns `true`.
+ fn visible(&self) -> bool {
+ true
+ }
}
/// Runs an [`Application`] with an executor, compositor, and the provided
@@ -145,6 +152,7 @@ where
.into_builder(
&application.title(),
application.mode(),
+ application.visible(),
event_loop.primary_monitor(),
)
.build(&event_loop)