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 <hugh.mcmaster@outlook.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2021-04-26 20:59:51 +10:00 committed by Alexandre Julliard
parent 8241d21ae0
commit daf95aaadf
1 changed files with 1 additions and 0 deletions

View File

@ -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);
}
}