[PATCH v2 4/5] comctl32: LVM_INSERTITEM handler should send LVN_ITEMCHANGING/LVN_ITEMCHANGED notifications when the item state is being set.
Nikolay Sivov
nsivov at codeweavers.com
Fri Feb 11 07:08:59 CST 2022
On 2/11/22 15:54, Dmitry Timoshkov wrote:
> 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.
>
I haven't tested properly, but I suspect it's only considered a change
if it's (LVIS_SELECTED|LVIS_FOCUSED).
More information about the wine-devel
mailing list