mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-02 14:50:04 -04:00
winit-win32: prevent inner size reported as (0,0) when minimized
This commit is contained in:
@@ -509,14 +509,7 @@ impl CoreWindow for Window {
|
||||
}
|
||||
|
||||
fn surface_size(&self) -> PhysicalSize<u32> {
|
||||
let mut rect: RECT = unsafe { mem::zeroed() };
|
||||
if unsafe { GetClientRect(self.hwnd(), &mut rect) } == false.into() {
|
||||
panic!(
|
||||
"Unexpected GetClientRect failure: please report this error to \
|
||||
rust-windowing/winit"
|
||||
)
|
||||
}
|
||||
PhysicalSize::new((rect.right - rect.left) as u32, (rect.bottom - rect.top) as u32)
|
||||
self.window_state_lock().surface_size
|
||||
}
|
||||
|
||||
fn outer_size(&self) -> PhysicalSize<u32> {
|
||||
|
||||
Reference in New Issue
Block a user