add maximized command line argument (#442)

macos-click-through
Keith Simmons 4 years ago committed by GitHub
parent ec06247ad2
commit 5b29700513
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -60,7 +60,8 @@ impl Settings {
!(arg.starts_with("--geometry=")
|| arg == "--wsl"
|| arg == "--disowned"
|| arg == "--multiGrid")
|| arg == "--multiGrid"
|| arg == "--maximized")
}
})
.collect::<Vec<String>>();

@ -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);

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

Loading…
Cancel
Save