Commit f1a3586f authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

comctl32/listview: Fix changed notification mask for inserted items.

parent 3cd366ee
......@@ -4258,7 +4258,7 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL
nmlv.uNewState = (item.state & ~stateMask) | (lpLVItem->state & stateMask);
nmlv.uOldState = item.state;
}
nmlv.uChanged = uChanged ? uChanged : lpLVItem->mask;
nmlv.uChanged = isNew ? LVIF_STATE : (uChanged ? uChanged : lpLVItem->mask);
nmlv.lParam = item.lParam;
/* Send change notification if the item is not being inserted, or inserted (selected|focused),
......
......@@ -6023,7 +6023,7 @@ static void test_LVM_INSERTITEM(void)
if ((insert_item[i].mask & LVIF_STATE) && (insert_item[i].state & (LVIS_FOCUSED | LVIS_SELECTED)))
{
sprintf(buf, "%d: insert focused", i);
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_insert_focused0_seq, buf, insert_item[i].mask != LVIF_STATE);
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_insert_focused0_seq, buf, FALSE);
}
else
{
......@@ -6100,7 +6100,7 @@ static void test_insertitem(void)
item.lParam = 0xdeadbeef;
ret = SendMessageA(hwnd, LVM_INSERTITEMA, 0, (LPARAM)&item);
ok(ret == 3, "got %d\n", ret);
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_insert_selected_seq, "insert selected", TRUE);
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_insert_selected_seq, "insert selected", FALSE);
/* insert item 4 */
item.mask = LVIF_PARAM;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment