Merge pull request #901 from neovide/fix-maximized-redraw

fix(renderer): Force grid redraw on startup with --maximized flag
macos-click-through
partizan 3 years ago committed by GitHub
commit 76eab1d676
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -176,11 +176,16 @@ impl GlutinWindowWrapper {
} }
if self.saved_grid_size.is_none() && !window.is_maximized() { if self.saved_grid_size.is_none() && !window.is_maximized() {
let size = SETTINGS.get::<CmdLineSettings>().geometry; let settings = SETTINGS.get::<CmdLineSettings>();
window.set_inner_size(self.renderer.grid_renderer.convert_grid_to_physical(size)); window.set_inner_size(
self.saved_grid_size = Some(size); self.renderer
.grid_renderer
.convert_grid_to_physical(settings.geometry),
);
self.saved_grid_size = Some(settings.geometry);
// Font change at startup is ignored, so grid size (and startup screen) could be preserved. // Font change at startup is ignored, so grid size (and startup screen) could be preserved.
font_changed = false; // But only when --maximize is not used. With maximized window we should redraw grid.
font_changed = settings.maximized;
} }
let new_size = window.inner_size(); let new_size = window.inner_size();

Loading…
Cancel
Save