Module: wine Branch: refs/heads/master Commit: ab4438e24d055b2b229b954a66f3bc3d9316c977 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=ab4438e24d055b2b229b954a...
Author: Mike McCormack mike@codeweavers.com Date: Wed Jan 11 12:11:46 2006 +0100
comctl32: Invalidate the entire progress bar any time it changes.
---
dlls/comctl32/progress.c | 29 +++-------------------------- 1 files changed, 3 insertions(+), 26 deletions(-)
diff --git a/dlls/comctl32/progress.c b/dlls/comctl32/progress.c index eb0b11a..cfed7ec 100644 --- a/dlls/comctl32/progress.c +++ b/dlls/comctl32/progress.c @@ -131,35 +131,12 @@ static inline int get_bar_position( PROG /*********************************************************************** * PROGRESS_Invalidate * - * Invalide the range between old and new pos. + * Don't be too clever about invalidating the progress bar. + * Installshield depends on this simple behaviour. */ static void PROGRESS_Invalidate( PROGRESS_INFO *infoPtr, INT old, INT new ) { - LONG style = GetWindowLongW (infoPtr->Self, GWL_STYLE); - RECT rect; - int oldPos, newPos; - BOOL barSmooth = (style & PBS_SMOOTH) && !GetWindowTheme (infoPtr->Self); - - get_client_rect( infoPtr->Self, &rect ); - - oldPos = get_bar_position( infoPtr, style, &rect, old ); - newPos = get_bar_position( infoPtr, style, &rect, new ); - - if (style & PBS_VERTICAL) - { - rect.top = rect.bottom - max( oldPos, newPos ); - rect.bottom = rect.bottom - min( oldPos, newPos ); - if (!barSmooth) rect.top -= - get_led_size (infoPtr, style, &rect) + get_led_gap (infoPtr); - } - else - { - rect.left = min( oldPos, newPos ); - rect.right = max( oldPos, newPos ); - if (!barSmooth) rect.right += - get_led_size (infoPtr, style, &rect) + get_led_gap (infoPtr); - } - InvalidateRect( infoPtr->Self, &rect, oldPos > newPos ); + InvalidateRect( infoPtr->Self, NULL, old > new ); }
/* Information for a progress bar drawing helper */