Fix initial dimensions of a fullscreen window on Windows (#909)

This commit is contained in:
Aleksi Juvani 2019-06-13 22:17:56 +03:00 committed by Osspial
parent db794b976c
commit 91f05e940f
2 changed files with 2 additions and 1 deletions

View file

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

View file

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