diff --git a/win32ss/user/ntuser/scrollbar.c b/win32ss/user/ntuser/scrollbar.c index 359bc923f5..0a30714075 100644 --- a/win32ss/user/ntuser/scrollbar.c +++ b/win32ss/user/ntuser/scrollbar.c @@ -667,6 +667,7 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) else /* Using Themes */ { RECTL UpdateRect = psbi->rcScrollBar; + BOOL RedrawNeeded = FALSE; TRACE("Using themes.\n"); UpdateRect.left -= Window->rcClient.left - Window->rcWindow.left; UpdateRect.right -= Window->rcClient.left - Window->rcWindow.left; @@ -679,14 +680,17 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) { UpdateRect.left += psbi->dxyLineButton; UpdateRect.right -= psbi->dxyLineButton; + RedrawNeeded = TRUE; } if (nBar == SB_VERT) { UpdateRect.top += psbi->dxyLineButton; UpdateRect.bottom -= psbi->dxyLineButton; + RedrawNeeded = TRUE; } } - co_UserRedrawWindow(Window, &UpdateRect, 0, RDW_INVALIDATE | RDW_FRAME); + if (RedrawNeeded) + co_UserRedrawWindow(Window, &UpdateRect, 0, RDW_INVALIDATE | RDW_FRAME); } } // FIXME: Arrows /* else if( action & SA_SSI_REPAINT_ARROWS )