From 4a5d639d748d416b02b9f7beedea35b5c894453d Mon Sep 17 00:00:00 2001 From: Osspial Date: Fri, 5 Jul 2019 17:28:11 -0400 Subject: [PATCH] On Windows, fix `with_maximized` not properly setting window size to entire window. (#1013) --- CHANGELOG.md | 1 + src/window.rs | 10 ---------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78882ff6..f551ec48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and `WindowEvent::HoveredFile`. - On Windows, fix edge case where `RedrawRequested` could be dispatched before input events in event loop iteration. - On Windows, fix timing issue that could cause events to be improperly dispatched after `RedrawRequested` but before `EventsCleared`. - On macOS, drop unused Metal dependency. +- On Windows, fix `with_maximized` not properly setting window size to entire window. # 0.20.0 Alpha 1 diff --git a/src/window.rs b/src/window.rs index 22c9f23b..3c452eef 100644 --- a/src/window.rs +++ b/src/window.rs @@ -291,16 +291,6 @@ impl WindowBuilder { mut self, window_target: &EventLoopWindowTarget, ) -> Result { - self.window.inner_size = Some(self.window.inner_size.unwrap_or_else(|| { - if let Some(ref monitor) = self.window.fullscreen { - // resizing the window to the dimensions of the monitor when fullscreen - LogicalSize::from_physical(monitor.size(), monitor.hidpi_factor()) // DPI factor applies here since this is a borderless window and not real fullscreen - } else { - // default dimensions - (1024, 768).into() - } - })); - // building platform_impl::Window::new(&window_target.p, self.window, self.platform_specific) .map(|window| Window { window })