On 2/11/22 15:54, Dmitry Timoshkov wrote:
Nikolay Sivov nsivov@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).