Waritnan Sookbuntherng : comctl32/status: Hide size grip when the parent window is maximized.
Module: wine Branch: master Commit: 1bb95af322543a644fb82004ae8a9450dd41d7ed URL: https://source.winehq.org/git/wine.git/?a=commit;h=1bb95af322543a644fb82004a... Author: Waritnan Sookbuntherng <lion328(a)hotmail.co.th> Date: Mon Dec 10 09:52:10 2018 +0000 comctl32/status: Hide size grip when the parent window is maximized. Signed-off-by: Waritnan Sookbuntherng <lion328(a)hotmail.co.th> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- 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 cb27ee8..3bf72fa 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 00db9f6..b7b5fb2 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);
participants (1)
-
Alexandre Julliard