From 55179e43c3e720cd5aa3001a1fa634e2aa1187ac Mon Sep 17 00:00:00 2001 From: Serg Tereshchenko Date: Mon, 16 Aug 2021 22:59:35 +0300 Subject: [PATCH] refactor: Refactor initial resize fix window.is_maximized() returns false on startup, using settings instead. Refs #892 --- src/window/window_wrapper/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/window/window_wrapper/mod.rs b/src/window/window_wrapper/mod.rs index defa96e..0dd3e6b 100644 --- a/src/window/window_wrapper/mod.rs +++ b/src/window/window_wrapper/mod.rs @@ -175,8 +175,8 @@ impl GlutinWindowWrapper { return; } - if self.saved_grid_size.is_none() && !window.is_maximized() { - let settings = SETTINGS.get::(); + let settings = SETTINGS.get::(); + if self.saved_grid_size.is_none() && !settings.maximized { window.set_inner_size( self.renderer .grid_renderer @@ -185,7 +185,7 @@ impl GlutinWindowWrapper { self.saved_grid_size = Some(settings.geometry); // Font change at startup is ignored, so grid size (and startup screen) could be preserved. // But only when --maximize is not used. With maximized window we should redraw grid. - font_changed = settings.maximized; + font_changed = false; } let new_size = window.inner_size();