comctl32/trackbar: Update thumb immediately on key press.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-01-18 19:43:57 +11:00 committed by Alexandre Julliard
parent dd294410bb
commit 88ea4c520b
2 changed files with 9 additions and 2 deletions

View File

@ -672,7 +672,14 @@ static void test_position(void)
r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0, 0);
ok(r == 30, "got %d\n", r);
SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect2);
ok(rect.left != rect2.left, "got %d\n", rect.left);
ok(rect.left != rect2.left, "got %d, expected %d\n", rect2.left, rect.left);
/* now move it with keys */
SendMessageA(hWndTrackbar, WM_KEYDOWN, VK_END, 0);
r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0, 0);
ok(r == 100, "got %d\n", r);
SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect);
ok(rect.left != rect2.left, "got %d, expected %d\n", rect.left, rect2.left);
DestroyWindow(hWndTrackbar);
}

View File

@ -1821,7 +1821,7 @@ TRACKBAR_KeyDown (TRACKBAR_INFO *infoPtr, INT nVirtKey)
}
if (pos != infoPtr->lPos) {
infoPtr->flags |=TB_THUMBPOSCHANGED;
TRACKBAR_UpdateThumb (infoPtr);
TRACKBAR_InvalidateThumbMove (infoPtr, pos, infoPtr->lPos);
}