Using MoveWindow instead of SetWindowPos to move the window now, which actually works.
This commit is contained in:
@@ -1089,12 +1089,13 @@ plat_setfullscreen(int on)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Main Window. */
|
/* Main Window. */
|
||||||
|
if (vid_resize >= 2)
|
||||||
|
MoveWindow(hwndMain, window_x, window_y, window_w, window_h, TRUE);
|
||||||
|
|
||||||
if (hide_status_bar)
|
if (hide_status_bar)
|
||||||
ResizeWindowByClientArea(hwndMain, temp_x, temp_y);
|
ResizeWindowByClientArea(hwndMain, temp_x, temp_y);
|
||||||
else
|
else
|
||||||
ResizeWindowByClientArea(hwndMain, temp_x, temp_y + sbar_height);
|
ResizeWindowByClientArea(hwndMain, temp_x, temp_y + sbar_height);
|
||||||
|
|
||||||
SetWindowPos(hwndMain, HWND_TOP, window_x, window_y, 0, 0, SWP_NOSIZE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Render window. */
|
/* Render window. */
|
||||||
|
@@ -980,7 +980,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
video_force_resize_set(1);
|
video_force_resize_set(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window_remember || (vid_resize & 2)) {
|
if (!(pos->flags & SWP_NOSIZE) && (window_remember || (vid_resize & 2))) {
|
||||||
window_x = pos->x;
|
window_x = pos->x;
|
||||||
window_y = pos->y;
|
window_y = pos->y;
|
||||||
if (!(vid_resize & 2)) {
|
if (!(vid_resize & 2)) {
|
||||||
@@ -1379,6 +1379,7 @@ ui_init(int nCmdShow)
|
|||||||
MoveWindow(hwnd, window_x, window_y, window_w, window_h, TRUE);
|
MoveWindow(hwnd, window_x, window_y, window_w, window_h, TRUE);
|
||||||
else {
|
else {
|
||||||
if (vid_resize >= 2) {
|
if (vid_resize >= 2) {
|
||||||
|
MoveWindow(hwnd, window_x, window_y, window_w, window_h, TRUE);
|
||||||
scrnsz_x = fixed_size_x;
|
scrnsz_x = fixed_size_x;
|
||||||
scrnsz_y = fixed_size_y;
|
scrnsz_y = fixed_size_y;
|
||||||
}
|
}
|
||||||
@@ -1386,8 +1387,6 @@ ui_init(int nCmdShow)
|
|||||||
ResizeWindowByClientArea(hwndMain, scrnsz_x, scrnsz_y);
|
ResizeWindowByClientArea(hwndMain, scrnsz_x, scrnsz_y);
|
||||||
else
|
else
|
||||||
ResizeWindowByClientArea(hwndMain, scrnsz_x, scrnsz_y + sbar_height);
|
ResizeWindowByClientArea(hwndMain, scrnsz_x, scrnsz_y + sbar_height);
|
||||||
|
|
||||||
SetWindowPos(hwndMain, HWND_TOP, window_x, window_y, 0, 0, SWP_NOSIZE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reset all menus to their defaults. */
|
/* Reset all menus to their defaults. */
|
||||||
|
Reference in New Issue
Block a user