mirror of
git://source.winehq.org/git/wine.git
synced 2024-08-31 08:14:06 +00:00
On mouse down in thumb, issue SB_THUMBTRACK with current position.
On mouse up in thumb, issue SB_THUMBPOSITION followed by SB_ENDSCROLL.
This commit is contained in:
parent
1d8d0171bb
commit
ff42c0174d
|
@ -1102,6 +1102,18 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
|
|||
break;
|
||||
}
|
||||
|
||||
if (msg == WM_LBUTTONDOWN)
|
||||
{
|
||||
|
||||
if (hittest == SCROLL_THUMB)
|
||||
{
|
||||
UINT val = SCROLL_GetThumbVal( infoPtr, &rect, vertical,
|
||||
trackThumbPos + lastMousePos - lastClickPos );
|
||||
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
|
||||
MAKEWPARAM( SB_THUMBTRACK, val ), (LPARAM)hwndCtl );
|
||||
}
|
||||
}
|
||||
|
||||
if (msg == WM_LBUTTONUP)
|
||||
{
|
||||
hittest = SCROLL_trackHitTest;
|
||||
|
@ -1114,8 +1126,7 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
|
|||
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
|
||||
MAKEWPARAM( SB_THUMBPOSITION, val ), (LPARAM)hwndCtl );
|
||||
}
|
||||
else
|
||||
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
|
||||
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
|
||||
SB_ENDSCROLL, (LPARAM)hwndCtl );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue