[PATCH v4 3/3] comctl32/status: Checking size grip bounds in x-axis only.
Waritnan Sookbuntherng
lion328 at hotmail.co.th
Mon Dec 10 03:52:10 CST 2018
Signed-off-by: Waritnan Sookbuntherng <lion328 at hotmail.co.th>
---
v2: Add this commit for checking bounds inclusively.
v3: Determine bounds using x-axis only.
v4: Update test.
---
dlls/comctl32/status.c | 5 +----
dlls/comctl32/tests/status.c | 20 ++++++++++----------
2 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c
index 3bf72fa577..6ea7d9e997 100644
--- a/dlls/comctl32/status.c
+++ b/dlls/comctl32/status.c
@@ -1009,10 +1009,7 @@ STATUSBAR_WMNCHitTest (const STATUS_INFO *infoPtr, INT x, INT y)
pt.y = y;
ScreenToClient (infoPtr->Self, &pt);
- rect.left = rect.right - 13;
- rect.top += 2;
-
- if (PtInRect (&rect, pt))
+ if (pt.x >= rect.right - GetSystemMetrics(SM_CXVSCROLL))
{
if (GetWindowLongW( infoPtr->Self, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL) return HTBOTTOMLEFT;
else return HTBOTTOMRIGHT;
diff --git a/dlls/comctl32/tests/status.c b/dlls/comctl32/tests/status.c
index b7b5fb273e..c7d9989218 100644
--- a/dlls/comctl32/tests/status.c
+++ b/dlls/comctl32/tests/status.c
@@ -615,17 +615,17 @@ static void test_sizegrip(void)
/* check bounds when not maximized */
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.left, rc.top));
- todo_wine expect(HTBOTTOMRIGHT, r);
+ expect(HTBOTTOMRIGHT, r);
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.left - 1, rc.top));
expect(HTCLIENT, r);
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.left, rc.top - 1));
- todo_wine expect(HTBOTTOMRIGHT, r);
+ expect(HTBOTTOMRIGHT, r);
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.right, rc.bottom));
- todo_wine expect(HTBOTTOMRIGHT, r);
+ expect(HTBOTTOMRIGHT, r);
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.right + 1, rc.bottom));
- todo_wine expect(HTBOTTOMRIGHT, r);
+ expect(HTBOTTOMRIGHT, r);
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.right, rc.bottom + 1));
- todo_wine expect(HTBOTTOMRIGHT, r);
+ expect(HTBOTTOMRIGHT, r);
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.right - 1, rc.bottom - 1));
expect(HTBOTTOMRIGHT, r);
@@ -638,17 +638,17 @@ static void test_sizegrip(void)
rc.right = pt.x;
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.left, rc.top));
- todo_wine expect(HTBOTTOMLEFT, r);
+ expect(HTBOTTOMLEFT, r);
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.left + 1, rc.top));
expect(HTCLIENT, r);
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.left, rc.top - 1));
- todo_wine expect(HTBOTTOMLEFT, r);
+ expect(HTBOTTOMLEFT, r);
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.right, rc.bottom));
- todo_wine expect(HTBOTTOMLEFT, r);
+ expect(HTBOTTOMLEFT, r);
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.right - 1, rc.bottom));
- todo_wine expect(HTBOTTOMLEFT, r);
+ expect(HTBOTTOMLEFT, r);
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.right, rc.bottom + 1));
- todo_wine expect(HTBOTTOMLEFT, r);
+ expect(HTBOTTOMLEFT, r);
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.right + 1, rc.bottom - 1));
expect(HTBOTTOMLEFT, r);
--
2.19.1
More information about the wine-devel
mailing list