[WINESYNC][COMCTL32] Listview: Initialize marqueeRect from left-click coordinates before starting a marquee highlight (#5555)

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.

Wine commit: daf95aaadf3a59f0ccc129a853327417b5e4f07c

author: Hugh McMaster <hugh.mcmaster@outlook.com>
Mon, 26 Apr 2021 10:59:51 +0000 (20:59 +1000)
This commit is contained in:
Thamatip Chitpong 2023-08-10 22:11:43 +07:00 committed by GitHub
parent c64103d55f
commit 918a818071
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4218,6 +4218,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);
}
}