mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
On Windows, fix with_maximized
not properly setting window size to entire window. (#1013)
This commit is contained in:
parent
74a7cf55ea
commit
4a5d639d74
|
@ -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
|
||||
|
||||
|
|
|
@ -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 })
|
||||
|
|
Loading…
Reference in a new issue