[PATCH v2 4/5] comctl32: LVM_INSERTITEM handler should send LVN_ITEMCHANGING/LVN_ITEMCHANGED notifications when the item state is being set.

Dmitry Timoshkov dmitry at baikal.ru
Fri Feb 11 06:54:22 CST 2022


Nikolay Sivov <nsivov at codeweavers.com> wrote:

> On 2/11/22 15:36, Dmitry Timoshkov wrote:
> > -    if (lpItem && !isNew && (infoPtr->notify_mask & NOTIFY_MASK_ITEM_CHANGE))
> > +    if (lpItem && (!isNew || (uChanged & LVIF_STATE)) && (infoPtr->notify_mask & NOTIFY_MASK_ITEM_CHANGE))
> >       {
> >         HWND hwndSelf = infoPtr->hwndSelf;
> >   
> > @@ -4352,8 +4353,8 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL
> >   	}
> >       }
> >   
> > -    /* if we're inserting the item, we're done */
> > -    if (isNew) return TRUE;
> > +    /* if we're inserting the item and its state is not being set, we're done */
> > +    if (isNew && !(uChanged & LVIF_STATE)) return TRUE;
> 
> This isn't right either. On Windows, inserting with e.g. 
> LVIF_STATE/LVIS_CUT does not produce a change notification.

Thanks for the quick review, looks like I need to add a test for this
case as well.

-- 
Dmitry.



More information about the wine-devel mailing list