diff options
author | 2021-04-09 09:00:29 -0700 | |
---|---|---|
committer | 2021-04-09 09:04:30 -0700 | |
commit | 84c0c9bc7ab858793183560739c8fd6087e22f6e (patch) | |
tree | 3cc5a3d85c57847044580b802cfa6d0df5948d6e /src | |
parent | 6f6f1d82e822983941f3b3ba1c6d93df3e98b8c3 (diff) | |
download | iced-84c0c9bc7ab858793183560739c8fd6087e22f6e.tar.gz iced-84c0c9bc7ab858793183560739c8fd6087e22f6e.tar.bz2 iced-84c0c9bc7ab858793183560739c8fd6087e22f6e.zip |
use Mode::Hidden instead
Diffstat (limited to 'src')
-rw-r--r-- | src/application.rs | 12 | ||||
-rw-r--r-- | src/window/mode.rs | 3 |
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, } |