diff --git a/src/settings/mod.rs b/src/settings/mod.rs index 988957e..feee379 100644 --- a/src/settings/mod.rs +++ b/src/settings/mod.rs @@ -60,7 +60,8 @@ impl Settings { !(arg.starts_with("--geometry=") || arg == "--wsl" || arg == "--disowned" - || arg == "--multiGrid") + || arg == "--multiGrid" + || arg == "--maximized") } }) .collect::>(); diff --git a/src/window/sdl2/mod.rs b/src/window/sdl2/mod.rs index 0856cec..836088a 100644 --- a/src/window/sdl2/mod.rs +++ b/src/window/sdl2/mod.rs @@ -395,7 +395,7 @@ pub fn start_loop( .expect("Failed to create sdl video subsystem"); video_subsystem.text_input().start(); - let sdl_window = video_subsystem + let mut sdl_window = video_subsystem .window("Neovide", logical_size.width, logical_size.height) .position_centered() .allow_highdpi() @@ -403,6 +403,11 @@ pub fn start_loop( .vulkan() .build() .expect("Failed to create window"); + log::info!("window created"); + + if std::env::args().any(|arg| arg == "--maximized") { + sdl_window.maximize(); + } let skulpin_renderer = { let sdl_window_wrapper = Sdl2Window::new(&sdl_window); diff --git a/src/window/winit/mod.rs b/src/window/winit/mod.rs index 423cbad..ba0ac1c 100644 --- a/src/window/winit/mod.rs +++ b/src/window/winit/mod.rs @@ -402,6 +402,7 @@ pub fn start_loop( logical_size.height, )) .with_window_icon(Some(icon)) + .with_maximized(std::env::args().any(|arg| arg == "--maximized")) .build(&event_loop) .expect("Failed to create window"); log::info!("window created");