summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/application.rs12
-rw-r--r--src/window/mode.rs3
2 files changed, 4 insertions, 11 deletions
diff --git a/src/application.rs b/src/application.rs
index 317f9801..ee532e0b 100644
--- a/src/application.rs
+++ b/src/application.rs
@@ -191,13 +191,6 @@ 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
@@ -284,6 +277,7 @@ where
match self.0.mode() {
window::Mode::Windowed => iced_winit::Mode::Windowed,
window::Mode::Fullscreen => iced_winit::Mode::Fullscreen,
+ window::Mode::Hidden => iced_winit::Mode::Hidden,
}
}
@@ -302,10 +296,6 @@ where
fn should_exit(&self) -> bool {
self.0.should_exit()
}
-
- fn visible(&self) -> bool {
- self.0.visible()
- }
}
#[cfg(target_arch = "wasm32")]
diff --git a/src/window/mode.rs b/src/window/mode.rs
index 37464711..fdce8e23 100644
--- a/src/window/mode.rs
+++ b/src/window/mode.rs
@@ -6,4 +6,7 @@ pub enum Mode {
/// The application takes the whole screen of its current monitor.
Fullscreen,
+
+ /// The application is hidden
+ Hidden,
}