From 533b7a5f308699e6101700f2449ca5cb64e25ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Fri, 26 Feb 2021 17:23:59 +0100 Subject: [PATCH] win_ui: don't reset remembered window size fixes #1291 --- src/win/win_ui.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/win/win_ui.c b/src/win/win_ui.c index d13a01b5e..7f7f66e5e 100644 --- a/src/win/win_ui.c +++ b/src/win/win_ui.c @@ -1241,12 +1241,12 @@ ui_init(int nCmdShow) hwndRender = CreateWindow(/*L"STATIC"*/ SUB_CLASS_NAME, NULL, WS_CHILD|SS_BITMAP, 0, 0, 1, 1, hwnd, NULL, hinstance, NULL); - /* Initiate a resize in order to properly arrange all controls. */ - ResizeWindowByClientArea(hwndMain, scrnsz_x, scrnsz_y + sbar_height); - - /* Move to the last-saved position if needed. */ + /* Initiate a resize in order to properly arrange all controls. + Move to the last-saved position if needed. */ if (window_remember) MoveWindow(hwnd, window_x, window_y, window_w, window_h, TRUE); + else + ResizeWindowByClientArea(hwndMain, scrnsz_x, scrnsz_y + sbar_height); /* Reset all menus to their defaults. */ ResetAllMenus();