Fix UI scaling factor not being applied at startup on X11

On wayland an event it dispatched right after window creation.
 This is not the case on X11 so we need to set it manually.
This commit is contained in:
meehl committed 2025-11-02 15:42:53 +01:00
1 parent cc38e31dbb
commit e877b599c1
3 files changed
+6 -1

No files matched your search

+3
View File
@@ -28,6 +28,9 @@ impl WindowState {
window.set_title(&title);
}
let winit::dpi::PhysicalSize { width, height } = window.inner_size();
self.size = PhysicalSize::new(width, height);
self.scale_factor = window.scale_factor() as f32;
self.window = Some(window);
}