diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 277522b15ca6022a01a8b6df48eb58ef042af8b2..c38acefa97446757555fa6c6d0e3215e96028f4a 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -7564,7 +7564,17 @@ static LRESULT LISTVIEW_VScroll(HWND hwnd, INT nScrollCode, SHORT nCurrentPos, { scrollInfo.fMask = SIF_POS; SetScrollInfo(hwnd, SB_VERT, &scrollInfo, TRUE); - InvalidateRect(hwnd, NULL, TRUE); + if (IsWindowVisible(infoPtr->hwndHeader)) + { + RECT rListview, rcHeader, rDest; + GetClientRect(hwnd, &rListview); + GetWindowRect(infoPtr->hwndHeader, &rcHeader); + MapWindowPoints((HWND) NULL, hwnd, (LPPOINT) &rcHeader, 2); + SubtractRect(&rDest, &rListview, &rcHeader); + InvalidateRect(hwnd, &rDest, TRUE); + } + else + InvalidateRect(hwnd, NULL, TRUE); } }