And fixed the behavior of that.
This commit is contained in:
@@ -1094,8 +1094,7 @@ plat_setfullscreen(int on)
|
|||||||
else
|
else
|
||||||
ResizeWindowByClientArea(hwndMain, temp_x, temp_y + sbar_height);
|
ResizeWindowByClientArea(hwndMain, temp_x, temp_y + sbar_height);
|
||||||
|
|
||||||
if (window_remember)
|
SetWindowPos(hwndMain, HWND_TOP, window_x, window_y, 0, 0, SWP_NOSIZE);
|
||||||
SetWindowPos(hwndMain, HWND_TOP, window_x, window_y, 0, 0, SWP_NOSIZE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Render window. */
|
/* Render window. */
|
||||||
|
@@ -97,7 +97,7 @@ SpecifyDimensionsDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM
|
|||||||
|
|
||||||
if (lock) {
|
if (lock) {
|
||||||
vid_resize = 2;
|
vid_resize = 2;
|
||||||
window_remember = 1;
|
window_remember = 0;
|
||||||
} else {
|
} else {
|
||||||
vid_resize = 1;
|
vid_resize = 1;
|
||||||
window_remember = 1;
|
window_remember = 1;
|
||||||
@@ -140,7 +140,7 @@ SpecifyDimensionsDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM
|
|||||||
if (mouse_capture)
|
if (mouse_capture)
|
||||||
ClipCursor(&r);
|
ClipCursor(&r);
|
||||||
|
|
||||||
if (window_remember) {
|
if (window_remember || (vid_resize & 2)) {
|
||||||
window_x = r.left;
|
window_x = r.left;
|
||||||
window_y = r.top;
|
window_y = r.top;
|
||||||
if (!(vid_resize & 2)) {
|
if (!(vid_resize & 2)) {
|
||||||
|
@@ -697,7 +697,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
window_remember = !window_remember;
|
window_remember = !window_remember;
|
||||||
CheckMenuItem(hmenu, IDM_VID_REMEMBER, window_remember ? MF_CHECKED : MF_UNCHECKED);
|
CheckMenuItem(hmenu, IDM_VID_REMEMBER, window_remember ? MF_CHECKED : MF_UNCHECKED);
|
||||||
GetWindowRect(hwnd, &rect);
|
GetWindowRect(hwnd, &rect);
|
||||||
if (window_remember) {
|
if (window_remember || (vid_resize & 2)) {
|
||||||
window_x = rect.left;
|
window_x = rect.left;
|
||||||
window_y = rect.top;
|
window_y = rect.top;
|
||||||
if (!(vid_resize & 2)) {
|
if (!(vid_resize & 2)) {
|
||||||
@@ -980,11 +980,13 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
video_force_resize_set(1);
|
video_force_resize_set(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window_remember) {
|
if (window_remember || (vid_resize & 2)) {
|
||||||
window_x = pos->x;
|
window_x = pos->x;
|
||||||
window_y = pos->y;
|
window_y = pos->y;
|
||||||
window_w = pos->cx;
|
if (!(vid_resize & 2)) {
|
||||||
window_h = pos->cy;
|
window_w = pos->cx;
|
||||||
|
window_h = pos->cy;
|
||||||
|
}
|
||||||
save_window_pos = 1;
|
save_window_pos = 1;
|
||||||
config_save();
|
config_save();
|
||||||
}
|
}
|
||||||
@@ -1385,8 +1387,7 @@ ui_init(int nCmdShow)
|
|||||||
else
|
else
|
||||||
ResizeWindowByClientArea(hwndMain, scrnsz_x, scrnsz_y + sbar_height);
|
ResizeWindowByClientArea(hwndMain, scrnsz_x, scrnsz_y + sbar_height);
|
||||||
|
|
||||||
if (window_remember)
|
SetWindowPos(hwndMain, HWND_TOP, window_x, window_y, 0, 0, SWP_NOSIZE);
|
||||||
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