diff options
Diffstat (limited to 'winit/src/settings.rs')
-rw-r--r-- | winit/src/settings.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/winit/src/settings.rs b/winit/src/settings.rs index 213ef47f..7175b9ed 100644 --- a/winit/src/settings.rs +++ b/winit/src/settings.rs @@ -14,7 +14,7 @@ mod platform; pub use platform::PlatformSpecific; use crate::conversion; -use crate::{Mode, Position}; +use crate::Position; use winit::monitor::MonitorHandle; use winit::window::WindowBuilder; @@ -65,6 +65,9 @@ pub struct Window { /// The maximum size of the window. pub max_size: Option<(u32, u32)>, + /// Whether the window should be visible or not. + pub visible: bool, + /// Whether the window should be resizable or not. pub resizable: bool, @@ -89,7 +92,6 @@ impl Window { pub fn into_builder( self, title: &str, - mode: Mode, primary_monitor: Option<MonitorHandle>, _id: Option<String>, ) -> WindowBuilder { @@ -104,8 +106,7 @@ impl Window { .with_decorations(self.decorations) .with_transparent(self.transparent) .with_window_icon(self.icon) - .with_always_on_top(self.always_on_top) - .with_visible(conversion::visible(mode)); + .with_always_on_top(self.always_on_top); if let Some(position) = conversion::position( primary_monitor.as_ref(), @@ -166,9 +167,6 @@ impl Window { ); } - window_builder = window_builder - .with_fullscreen(conversion::fullscreen(primary_monitor, mode)); - window_builder } } @@ -180,6 +178,7 @@ impl Default for Window { position: Position::default(), min_size: None, max_size: None, + visible: true, resizable: true, decorations: true, transparent: false, |