diff --git a/src/win/win_ui.c b/src/win/win_ui.c index a583d35b2..9e67f7c5a 100644 --- a/src/win/win_ui.c +++ b/src/win/win_ui.c @@ -8,7 +8,7 @@ * * user Interface module for WinAPI on Windows. * - * Version: @(#)win_ui.c 1.0.21 2018/02/14 + * Version: @(#)win_ui.c 1.0.22 2018/02/15 * * Authors: Sarah Walker, * Miran Grca, @@ -616,8 +616,10 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) temp_x = (lParam & 0xFFFF); temp_y = (lParam >> 16) - (21 + sb_borders[1]); - if (temp_y < 0) - temp_y = 0; + if (temp_x < 1) + temp_x = 1; + if (temp_y < 1) + temp_y = 1; if ((temp_x != scrnsz_x) || (temp_y != scrnsz_y)) doresize = 1; @@ -627,8 +629,6 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) MoveWindow(hwndRender, 0, 0, scrnsz_x, scrnsz_y, TRUE); - plat_vidsize(scrnsz_x, scrnsz_y); - GetWindowRect(hwndRender, &rect); /* Status bar. */ @@ -636,6 +636,8 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) 0, rect.bottom + GetSystemMetrics(SM_CYEDGE), scrnsz_x, 17, TRUE); + plat_vidsize(scrnsz_x, scrnsz_y); + if (mouse_capture) { GetWindowRect(hwndRender, &rect);