diff --git a/dlls/comctl32/tests/trackbar.c b/dlls/comctl32/tests/trackbar.c index 7c04d151940..adb1b126573 100644 --- a/dlls/comctl32/tests/trackbar.c +++ b/dlls/comctl32/tests/trackbar.c @@ -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); } diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c index c0f58dbf128..87d955cb0e0 100644 --- a/dlls/comctl32/trackbar.c +++ b/dlls/comctl32/trackbar.c @@ -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); }