winit-win32: prevent inner size reported as (0,0) when minimized

This commit is contained in:
Diggory Hardy
2025-11-01 14:39:57 +00:00
committed by GitHub
parent 9d9d21cfdb
commit a9c189a423
5 changed files with 37 additions and 10 deletions

View File

@@ -33,6 +33,9 @@ pub(crate) struct WindowState {
pub min_size: Option<Size>,
pub max_size: Option<Size>,
/// The last known size of the window surface
pub surface_size: PhysicalSize<u32>,
pub surface_resize_increments: Option<Size>,
pub window_icon: Option<Icon>,
@@ -166,6 +169,8 @@ impl WindowState {
min_size: attributes.min_surface_size,
max_size: attributes.max_surface_size,
surface_size: PhysicalSize::default(),
surface_resize_increments: attributes.surface_resize_increments,
window_icon: attributes.window_icon.clone(),