[PATCH] comctl32/listview: Do not select the first list item when drawing a marquee rectangle

Nikolay Sivov bunglehead at gmail.com
Tue May 23 13:34:04 CDT 2017


On 22.05.2017 16:02, Hugh McMaster wrote:
> Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
> ---
>  dlls/comctl32/listview.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
> index c681451..a117f83 100644
> --- a/dlls/comctl32/listview.c
> +++ b/dlls/comctl32/listview.c
> @@ -3892,6 +3892,9 @@ static void LISTVIEW_MarqueeHighlight(LISTVIEW_INFO *infoPtr, const POINT *coord
>      if ((scroll & SCROLL_DOWN) && (coords_orig->y >= infoPtr->rcList.bottom))
>          LISTVIEW_Scroll(infoPtr, 0, (coords_orig->y - infoPtr->rcList.bottom));
>  
> +    if (IsRectEmpty(&infoPtr->marqueeRect))
> +        infoPtr->marqueeRect = rect;
> +
>      iterator_frameditems_absolute(&old_elems, infoPtr, &infoPtr->marqueeRect);
>  
>      infoPtr->marqueeRect = rect;
> 

I see what you mean, when you start selecting with marquee first item in
report mode is always selected. This patch fixes that, but breaks ICON
mode it seems - sometimes items are not selected when they are clearly
intersect with marquee rectangle. Admittedly this selection mode is
already funny in ICON mode, it does not use dead zones properly, so
slight movement selects things, while it should check with icon
rectangle when resized horizontally, and allow about half icon rectangle
intersect marquee vertically before setting item state.



More information about the wine-devel mailing list