From ac4de71f853e1b1a89792e4bce0069473c5d4cab Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Fri, 27 Jan 2006 12:10:40 +0100 Subject: [PATCH] user: Postpone resetting SCROLL_TrackingWin untill all notifications are sent. --- dlls/user/scroll.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/user/scroll.c b/dlls/user/scroll.c index 8774a88dc2c..8a6467246fb 100644 --- a/dlls/user/scroll.c +++ b/dlls/user/scroll.c @@ -953,7 +953,7 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt) { if (SCROLL_MovingThumb) SCROLL_DrawMovingThumb(hdc, &rect, vertical, arrowSize, thumbSize); - SCROLL_TrackingWin = 0; + SCROLL_DrawInterior( hwnd, hdc, nBar, &rect, arrowSize, thumbSize, thumbPos, infoPtr->flags, vertical, FALSE, FALSE ); @@ -1049,8 +1049,12 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt) SendMessageW( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL, MAKEWPARAM( SB_THUMBPOSITION, val ), (LPARAM)hwndCtl ); } + /* SB_ENDSCROLL doesn't report thumb position */ SendMessageW( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL, SB_ENDSCROLL, (LPARAM)hwndCtl ); + + /* Terminate tracking */ + SCROLL_TrackingWin = 0; } ReleaseDC( hwnd, hdc ); @@ -1200,6 +1204,10 @@ static BOOL SCROLL_GetScrollInfo(HWND hwnd, INT nBar, LPSCROLLINFO info) info->nMax = infoPtr->maxVal; } + TRACE("cbSize %02x fMask %04x nMin %d nMax %d nPage %u nPos %d nTrackPos %d\n", + info->cbSize, info->fMask, info->nMin, info->nMax, info->nPage, + info->nPos, info->nTrackPos); + return (info->fMask & SIF_ALL) != 0; }