use Mode::Hidden instead

This commit is contained in:
Cory Forsstrom 2021-04-09 09:00:29 -07:00
parent 6f6f1d82e8
commit 84c0c9bc7a
8 changed files with 19 additions and 35 deletions

View file

@ -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")]

View file

@ -6,4 +6,7 @@ pub enum Mode {
/// The application takes the whole screen of its current monitor.
Fullscreen,
/// The application is hidden
Hidden,
}