[PATCH v4 2/3] comctl32/status: Hide size grip when the parent window is maximized.
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>
---
v4: Update test.
---
dlls/comctl32/status.c | 6 ++++--
dlls/comctl32/tests/status.c | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c
index cb27ee868c..3bf72fa577 100644
--- a/dlls/comctl32/status.c
+++ b/dlls/comctl32/status.c
@@ -284,7 +284,8 @@ STATUSBAR_Refresh (STATUS_INFO *infoPtr, HDC hdc)
SelectObject (hdc, hOldFont);
- if (GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP)
+ if ((GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP)
+ && !(GetWindowLongW (infoPtr->Notify, GWL_STYLE) & WS_MAXIMIZE))
STATUSBAR_DrawSizeGrip (theme, hdc, &rect);
return 0;
@@ -997,7 +998,8 @@ STATUSBAR_WMGetText (const STATUS_INFO *infoPtr, INT size, LPWSTR buf)
static BOOL
STATUSBAR_WMNCHitTest (const STATUS_INFO *infoPtr, INT x, INT y)
{
- if (GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP) {
+ if ((GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP)
+ && !(GetWindowLongW (infoPtr->Notify, GWL_STYLE) & WS_MAXIMIZE)) {
RECT rect;
POINT pt;
diff --git a/dlls/comctl32/tests/status.c b/dlls/comctl32/tests/status.c
index 00db9f6737..b7b5fb273e 100644
--- a/dlls/comctl32/tests/status.c
+++ b/dlls/comctl32/tests/status.c
@@ -682,7 +682,7 @@ static void test_sizegrip(void)
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.right, rc.bottom + 1));
expect(HTNOWHERE, r);
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.right - 1, rc.bottom - 1));
- todo_wine expect(HTCLIENT, r);
+ expect(HTCLIENT, r);
/* maximized with right-to-left */
SetWindowLongA(hwndStatus, GWL_EXSTYLE, WS_EX_LAYOUTRTL);
@@ -705,7 +705,7 @@ static void test_sizegrip(void)
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.right, rc.bottom + 1));
expect(HTNOWHERE, r);
r = SendMessageA(hwndStatus, WM_NCHITTEST, 0, MAKELPARAM(rc.right + 1, rc.bottom - 1));
- todo_wine expect(HTCLIENT, r);
+ expect(HTCLIENT, r);
SetWindowLongA(g_hMainWnd, GWL_STYLE, style);
DestroyWindow(hwndStatus);
--
2.19.1
More information about the wine-devel
mailing list