Adding SWP_NOMOVE flag to prevent the window from moving to 0,0 when setting the inner size on Windows 8+

This commit is contained in:
datalus 2015-04-30 18:52:48 -05:00
parent c1ca5d1d87
commit 899e021666

View file

@ -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);
}
}