Zhiyi Zhang (@zhiyi) commented about dlls/comctl32/listview.c:
- OffsetRect(&r, -r.left, -r.top);
- dc = GetDCEx(infoPtr->hwndSelf, region, DCX_WINDOW | DCX_INTERSECTRGN); if (infoPtr->hwndHeader && LISTVIEW_IsHeaderEnabled(infoPtr)) {
LONG border_cx, border_cy;
GetWindowRect(infoPtr->hwndHeader, &window_rect);
r.top = min(r.bottom, r.top + window_rect.bottom - window_rect.top);
- }
border_cx = window_rect.left - r.left;
border_cy = window_rect.top - r.top;
- dc = GetDCEx(infoPtr->hwndSelf, region, DCX_WINDOW|DCX_INTERSECTRGN);
OffsetRect(&window_rect, -window_rect.left, -window_rect.top);
OffsetRect(&window_rect, border_cx, border_cy);
These two lines can be replaced with OffsetRect(&window_rect, -r.left, -r.top); and you can remove border_cx/cy.
Otherwise, the patch looks good to me.