From b1d27d66e22283d447dd64aa2e8e788efdaebffa Mon Sep 17 00:00:00 2001 From: David Capello Date: Sun, 6 Jul 2014 20:37:13 -0300 Subject: [PATCH] Fix issue 414 for WinXP in classic theme: unable to resize window from bottom/right edges On WinXP classic theme we receive a WM_NCHITTEST messages for the scrollbars, and as they overlap the resize borders (see WM_NCCALCSIZE handler) we have to return a proper value as if they really were the borders of the window. Note: Scrollbars are still visible in classic theme, that is just ugly, but at least the user can resize the window from bottom and right edges. --- src/she/alleg4/she_alleg4.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/she/alleg4/she_alleg4.cpp b/src/she/alleg4/she_alleg4.cpp index 0676086db..d1196f152 100644 --- a/src/she/alleg4/she_alleg4.cpp +++ b/src/she/alleg4/she_alleg4.cpp @@ -323,11 +323,13 @@ static LRESULT CALLBACK wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpara LRESULT result = ::CallWindowProc(base_wndproc, hwnd, msg, wparam, lparam); // We ignore scrollbars so if the mouse is above them, we return - // as it's in the client area. (Remember that we have scroll - // bars are enabled and visible to receive trackpad messages - // only.) - if (result == HTHSCROLL || result == HTVSCROLL) - result = HTCLIENT; + // as it's in the window resize area. (Remember that we have + // scroll bars are enabled and visible to receive trackpad + // messages only.) + if (result == HTHSCROLL) + result = HTBOTTOM; + else if (result == HTVSCROLL) + result = HTRIGHT; return result; }