Commit ff42c017 authored by Duane Clark's avatar Duane Clark Committed by Alexandre Julliard

On mouse down in thumb, issue SB_THUMBTRACK with current position.

On mouse up in thumb, issue SB_THUMBPOSITION followed by SB_ENDSCROLL.
parent 1d8d0171
...@@ -1102,6 +1102,18 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt) ...@@ -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) ...@@ -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 );
} }
......
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