Zhiyi Zhang : user32: Call SCROLL_DrawScrollBar() to draw tracks in SCROLL_HandleScrollEvent().
Alexandre Julliard
julliard at winehq.org
Tue Jul 6 18:09:34 CDT 2021
Module: wine
Branch: master
Commit: e04e857a1f1704f86a80def88a9e62a0dc8f2186
URL: https://source.winehq.org/git/wine.git/?a=commit;h=e04e857a1f1704f86a80def88a9e62a0dc8f2186
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Tue Jul 6 15:07:31 2021 +0800
user32: Call SCROLL_DrawScrollBar() to draw tracks in SCROLL_HandleScrollEvent().
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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))
More information about the wine-cvs
mailing list