Commit ac6817de authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

user32: Modify SCROLL_MovingThumb outside of SCROLL_DrawMovingThumb().

SCROLL_MovingThumb is a global variable. Gradually move it out of scroll bar drawing functions so that those drawing functions can be refactored in a way that doesn't need access to global variables. Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent d164f062
......@@ -484,8 +484,6 @@ static void SCROLL_DrawMovingThumb( HDC hdc, RECT *rect, BOOL vertical,
SCROLL_DrawInterior( SCROLL_TrackingWin, hdc, SCROLL_TrackingBar, rect, arrowSize, thumbSize, pos,
0, vertical, FALSE, FALSE );
SCROLL_MovingThumb = !SCROLL_MovingThumb;
}
/***********************************************************************
......@@ -625,6 +623,7 @@ void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar,
if (SCROLL_MovingThumb && SCROLL_TrackingWin == hwnd && SCROLL_TrackingBar == nBar)
{
SCROLL_DrawMovingThumb( hdc, &rect, vertical, arrowSize, thumbSize );
SCROLL_MovingThumb = FALSE;
}
else
{
......@@ -867,7 +866,10 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
vertical,
SCROLL_TrackingPos );
if (!SCROLL_MovingThumb)
{
SCROLL_DrawMovingThumb(hdc, &rect, vertical, arrowSize, thumbSize);
SCROLL_MovingThumb = TRUE;
}
}
else if (msg == WM_LBUTTONUP)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment