From da79608b9d7b2e9c9ec1a9c518ffc145fe8c48cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Sun, 22 Sep 2024 17:24:58 +0200 Subject: [PATCH] update host window size in SetWindowPos --- win32/src/winapi/user32/window.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/win32/src/winapi/user32/window.rs b/win32/src/winapi/user32/window.rs index 82c9848e..c25da1b5 100644 --- a/win32/src/winapi/user32/window.rs +++ b/win32/src/winapi/user32/window.rs @@ -914,6 +914,11 @@ pub async fn SetWindowPos( }; dispatch_message(machine, &msg).await; + let window = machine.state.user32.windows.get_mut(hWnd).unwrap(); + let menu = true; // TODO + let (width, height) = client_size_from_window_size(window.style, menu, cx as u32, cy as u32); + window.set_client_size(&mut *machine.host, width, height); + true }