mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 08:49:15 +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
1 changed files with 13 additions and 2 deletions
|
@ -1102,6 +1102,18 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
|
||||||
break;
|
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)
|
if (msg == WM_LBUTTONUP)
|
||||||
{
|
{
|
||||||
hittest = SCROLL_trackHitTest;
|
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,
|
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
|
||||||
MAKEWPARAM( SB_THUMBPOSITION, val ), (LPARAM)hwndCtl );
|
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 );
|
SB_ENDSCROLL, (LPARAM)hwndCtl );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue