mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 05:21:31 +11:00
Fix initial dimensions of a fullscreen window on Windows (#909)
This commit is contained in:
parent
db794b976c
commit
91f05e940f
|
@ -42,6 +42,7 @@
|
|||
- **Breaking:** On macOS, change `ns` identifiers to use snake_case for consistency with iOS's `ui` identifiers.
|
||||
- Add `MonitorHandle::video_modes` method for retrieving supported video modes for the given monitor.
|
||||
- On Wayland, the window now exists even if nothing has been drawn.
|
||||
- On Windows, fix initial dimensions of a fullscreen window.
|
||||
|
||||
# Version 0.19.1 (2019-04-08)
|
||||
|
||||
|
|
|
@ -287,7 +287,7 @@ impl WindowBuilder {
|
|||
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(), 1.0)
|
||||
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()
|
||||
|
|
Loading…
Reference in a new issue