On Windows, fix with_maximized not properly setting window size to entire window. (#1013)

This commit is contained in:
Osspial 2019-07-05 17:28:11 -04:00 committed by GitHub
parent 74a7cf55ea
commit 4a5d639d74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 10 deletions

View file

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

View file

@ -291,16 +291,6 @@ impl WindowBuilder {
mut self,
window_target: &EventLoopWindowTarget<T>,
) -> Result<Window, OsError> {
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 })