From daf95aaadf3a59f0ccc129a853327417b5e4f07c Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Mon, 26 Apr 2021 20:59:51 +1000 Subject: [PATCH] comctl32/listview: Initialize marqueeRect from left-click coordinates before starting a marquee highlight. The infoPtr->marqueeRect structure is not currently initialized before the marquee highlight sequence starts, resulting in the RECT having initial coordinates of (0,0)-(0,0). These coordinates cause the first item in the listview control to be identified as being within the range of the marqueeRect's coordinates. That item is then set to LVIS_SELECTED even though it is not part of the marquee selection. Signed-off-by: Hugh McMaster Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/comctl32/listview.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 05a772ab175..8cbfee834ce 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -4113,6 +4113,7 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN /* Begin selection and capture mouse */ infoPtr->bMarqueeSelect = TRUE; + infoPtr->marqueeRect = rect; SetCapture(infoPtr->hwndSelf); } } -- 2.11.4.GIT