From 91f05e940f7b7a6d0dab5245db6aefcea8065432 Mon Sep 17 00:00:00 2001 From: Aleksi Juvani <3168386+aleksijuvani@users.noreply.github.com> Date: Thu, 13 Jun 2019 22:17:56 +0300 Subject: [PATCH] Fix initial dimensions of a fullscreen window on Windows (#909) --- CHANGELOG.md | 1 + src/window.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be8835df..a6f21653 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/src/window.rs b/src/window.rs index c042f109..f2f246d2 100644 --- a/src/window.rs +++ b/src/window.rs @@ -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()