From 899e021666f9450d8fe07cd25207a4925be2af9f Mon Sep 17 00:00:00 2001 From: datalus Date: Thu, 30 Apr 2015 18:52:48 -0500 Subject: Adding SWP_NOMOVE flag to prevent the window from moving to 0,0 when setting the inner size on Windows 8+ --- src/api/win32/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/api/win32') diff --git a/src/api/win32/mod.rs b/src/api/win32/mod.rs index e6f5cb8..d0caea7 100644 --- a/src/api/win32/mod.rs +++ b/src/api/win32/mod.rs @@ -197,7 +197,7 @@ impl Window { unsafe { user32::SetWindowPos(self.window.0, ptr::null_mut(), 0, 0, x as libc::c_int, - y as libc::c_int, winapi::SWP_NOZORDER | winapi::SWP_NOREPOSITION); + y as libc::c_int, winapi::SWP_NOZORDER | winapi::SWP_NOREPOSITION | winapi::SWP_NOMOVE); user32::UpdateWindow(self.window.0); } } -- cgit v1.2.3