From: Jim Mussared Subject: Re: [PATCH] comctl32/listview: Fix subitem invalidation. Message-Id: Date: Mon, 24 Sep 2018 18:12:22 +1000 In-Reply-To: <20180924074334.4277-1-nsivov@codeweavers.com> References: <20180924074334.4277-1-nsivov@codeweavers.com> On Mon, 24 Sep 2018 at 17:43, Nikolay Sivov wrote: > > From: Jim Mussared > > It's wrong to offset by item position, columns could be reordered. Thanks Nikolay and Zhiyi - sorry this patch was no good, I'm new to Wine and got a bit excited when I saw Cut2D doing the right thing. I have written some conformance tests to show the underlying issue is that when columns are reordered, subitem hittesting (LVM_SUBITEMHITTEST) returns different results on Windows, and invalidation doesn't calculate the right bounds. Working on a new patch set, hoping to find some time in the next couple of days to send it. > > Signed-off-by: Nikolay Sivov > --- > dlls/comctl32/listview.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c > index 777b40f2fe..95d619af75 100644 > --- a/dlls/comctl32/listview.c > +++ b/dlls/comctl32/listview.c > @@ -1753,7 +1753,7 @@ static inline void LISTVIEW_InvalidateSubItem(const LISTVIEW_INFO *infoPtr, INT > LISTVIEW_GetHeaderRect(infoPtr, nSubItem, &rcBox); > rcBox.top = 0; > rcBox.bottom = infoPtr->nItemHeight; > - OffsetRect(&rcBox, Origin.x + Position.x, Origin.y + Position.y); > + OffsetRect(&rcBox, Origin.x, Origin.y + Position.y); > LISTVIEW_InvalidateRect(infoPtr, &rcBox); > } > > -- > 2.19.0 >