Module: wine
Branch: master
Commit: daf95aaadf3a59f0ccc129a853327417b5e4f07c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=daf95aaadf3a59f0ccc129a8…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com>
Date: Mon Apr 26 20:59:51 2021 +1000
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(a)outlook.com>
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
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);
}
}