From e6ab6785157ca04f59cffeb01ad876fb7ec4d83c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 22 Apr 2019 10:20:39 +0200 Subject: [PATCH] - fixed: The minimal window size was not calculated properly. Minimum size is 640x400 client size not 640x400 window size in non-fullscreen. --- src/win32/i_input.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/win32/i_input.cpp b/src/win32/i_input.cpp index 74791cc5c..7753566e9 100644 --- a/src/win32/i_input.cpp +++ b/src/win32/i_input.cpp @@ -525,8 +525,10 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) } else { - mmi->ptMinTrackSize.x = VID_MIN_WIDTH; - mmi->ptMinTrackSize.y = VID_MIN_HEIGHT; + RECT rect = { 0, 0, VID_MIN_WIDTH, VID_MIN_HEIGHT }; + AdjustWindowRectEx(&rect, GetWindowLongW(hWnd, GWL_STYLE), FALSE, GetWindowLongW(hWnd, GWL_EXSTYLE)); + mmi->ptMinTrackSize.x = rect.right - rect.left; + mmi->ptMinTrackSize.y = rect.bottom - rect.top; } return 0; }