Module: wine Branch: master Commit: 00e2d897c2389a3ac463abfcd26d7a77ac7ed59b URL: http://source.winehq.org/git/wine.git/?a=commit;h=00e2d897c2389a3ac463abfcd2...
Author: Vincent Povirk madewokherd+d41d@gmail.com Date: Sat Nov 15 21:50:54 2008 -0600
comctl32: Do not repaint on TBM_SETPOS if position is unchanged.
---
dlls/comctl32/tests/trackbar.c | 4 ++++ dlls/comctl32/trackbar.c | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/comctl32/tests/trackbar.c b/dlls/comctl32/tests/trackbar.c index f69e286..f54e32e 100644 --- a/dlls/comctl32/tests/trackbar.c +++ b/dlls/comctl32/tests/trackbar.c @@ -141,11 +141,13 @@ static const struct message position_test_seq[] = { { TBM_SETPOS, sent|wparam|lparam, TRUE, 5}, { WM_PAINT, sent|defwinproc}, { TBM_GETPOS, sent}, + { TBM_SETPOS, sent|wparam|lparam, TRUE, 5}, { TBM_SETPOS, sent|wparam|lparam, TRUE, 1000}, { WM_PAINT, sent|defwinproc}, { TBM_GETPOS, sent}, { TBM_SETPOS, sent|wparam|lparam, FALSE, 20}, { TBM_GETPOS, sent}, + { TBM_SETPOS, sent|wparam|lparam, TRUE, 20}, { TBM_GETPOS, sent}, {0} }; @@ -605,12 +607,14 @@ static void test_position(HWND hWndTrackbar){ SendMessage(hWndTrackbar, TBM_SETPOS, TRUE, 5); r = SendMessage(hWndTrackbar, TBM_GETPOS, 0,0); expect(5, r); + SendMessage(hWndTrackbar, TBM_SETPOS, TRUE, 5); SendMessage(hWndTrackbar, TBM_SETPOS, TRUE, 1000); r = SendMessage(hWndTrackbar, TBM_GETPOS, 0,0); expect(100, r); SendMessage(hWndTrackbar, TBM_SETPOS, FALSE, 20); r = SendMessage(hWndTrackbar, TBM_GETPOS, 0,0); expect(20, r); + SendMessage(hWndTrackbar, TBM_SETPOS, TRUE, 20);
/* test TBM_GETPOS */ r = SendMessage(hWndTrackbar, TBM_GETPOS, 0,0); diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c index a9959e2..c72f29b 100644 --- a/dlls/comctl32/trackbar.c +++ b/dlls/comctl32/trackbar.c @@ -1148,7 +1148,7 @@ TRACKBAR_SetPos (TRACKBAR_INFO *infoPtr, BOOL fPosition, LONG lPosition) infoPtr->lPos = infoPtr->lRangeMax; infoPtr->flags |= TB_THUMBPOSCHANGED;
- if (fPosition) TRACKBAR_InvalidateThumbMove(infoPtr, oldPos, lPosition); + if (fPosition && oldPos != lPosition) TRACKBAR_InvalidateThumbMove(infoPtr, oldPos, lPosition);
return 0; }