[PATCH] comctl32/listview: Initialize marqueeRect from left-click coordinates before starting a marquee highlight

Hugh McMaster hugh.mcmaster at outlook.com
Mon Apr 26 23:40:27 CDT 2021


Hi Nikolay,

On Tue, 27 Apr 2021 at 03:47, Nikolay Sivov wrote:
> On 4/26/21 1:59 PM, Hugh McMaster wrote:
> > 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.
> >
> >
> Could you describe how to test this, with builtin programs if possible?

1. In regedit or explorer, click on the window with the listview
control. Then hold down the left mouse button in an empty part of the
listview control and move the cursor diagonally to create a marquee
rectangle. You will see the first list item become selected.
2. If the list has multiple items, try selecting multiple items using
Ctrl-click. Then repeat step 1 while holding Ctrl down. The first list
item still becomes selected.

I've seen this behaviour in programs using report/details and list
modes. I don't believe it affects icon mode.

You can also see this issue using Control Spy.

Let me know if you need more information.



More information about the wine-devel mailing list