Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/user32/scroll.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index 4abb13d5199..fdd657feda6 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -614,6 +614,13 @@ void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar, enum SCROLL_HITTEST hit SCROLL_DrawMovingThumb( hdc, &rect, vertical, arrowSize, thumbSize ); SCROLL_MovingThumb = FALSE; } + else if (vertical == SCROLL_trackVertical && GetCapture() == hwnd) + { + SCROLL_DrawInterior( hwnd, hdc, nBar, &rect, arrowSize, thumbSize, thumbPos, + infoPtr->flags, vertical, + hit_test == SCROLL_trackHitTest && hit_test == SCROLL_TOP_RECT, + hit_test == SCROLL_trackHitTest && hit_test == SCROLL_BOTTOM_RECT ); + } else { SCROLL_DrawInterior( hwnd, hdc, nBar, &rect, arrowSize, thumbSize, thumbPos, @@ -836,9 +843,7 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt) break;
case SCROLL_TOP_RECT: - SCROLL_DrawInterior( hwnd, hdc, nBar, &rect, arrowSize, thumbSize, - thumbPos, infoPtr->flags, vertical, - (hittest == SCROLL_trackHitTest), FALSE ); + SCROLL_DrawScrollBar( hwnd, hdc, nBar, hittest, FALSE, TRUE ); if (hittest == SCROLL_trackHitTest) { if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER)) @@ -869,9 +874,7 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt) } else if (msg == WM_LBUTTONUP) { - SCROLL_DrawInterior( hwnd, hdc, nBar, &rect, arrowSize, thumbSize, - thumbPos, infoPtr->flags, vertical, - FALSE, FALSE ); + SCROLL_DrawScrollBar( hwnd, hdc, nBar, SCROLL_NOWHERE, FALSE, TRUE ); } else /* WM_MOUSEMOVE */ { @@ -900,9 +903,7 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt) break;
case SCROLL_BOTTOM_RECT: - SCROLL_DrawInterior( hwnd, hdc, nBar, &rect, arrowSize, thumbSize, - thumbPos, infoPtr->flags, vertical, - FALSE, (hittest == SCROLL_trackHitTest) ); + SCROLL_DrawScrollBar( hwnd, hdc, nBar, hittest, FALSE, TRUE ); if (hittest == SCROLL_trackHitTest) { if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=93678
Your paranoid android.
=== debiant2 (32 bit Chinese:China report) ===
user32: msg.c:14834: Test failed: bad time f76b020 win.c:10360: Test failed: Expected foreground window 0, got 00E400F2 win.c:10366: Test failed: Expected foreground window 00150128, got 00E400F2
=== debiant2 (32 bit WoW report) ===
user32: win.c:10364: Test failed: GetActiveWindow() = 00000000 win.c:10364: Test failed: GetFocus() = 00000000 win.c:10366: Test failed: Expected foreground window 00150128, got 00E400F2 win.c:10369: Test failed: Received WM_ACTIVATEAPP(0), did not expect it. win.c:10376: Test failed: Expected foreground window 00150128, got 00000000 win.c:10378: Test failed: GetActiveWindow() = 00000000 win.c:10378: Test failed: GetFocus() = 00000000 win.c:10386: Test failed: Received WM_ACTIVATEAPP(1), did not expect it.