Commit f9b14fda authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/treeview: Store item state supplied from TVN_GETDISPINFO handler.

parent 1fa1c72d
...@@ -468,10 +468,11 @@ static void test_callback(void) ...@@ -468,10 +468,11 @@ static void test_callback(void)
tvi.hItem = hRoot; tvi.hItem = hRoot;
tvi.mask = TVIF_IMAGE; tvi.mask = TVIF_IMAGE;
tvi.state = INDEXTOSTATEIMAGEMASK(1); tvi.state = INDEXTOSTATEIMAGEMASK(1);
tvi.stateMask = 0;
ret = TreeView_GetItem(hTree, &tvi); ret = TreeView_GetItem(hTree, &tvi);
expect(TRUE, ret); expect(TRUE, ret);
/* handler sets TVIS_SELECTED as well */ /* handler sets TVIS_SELECTED as well */
todo_wine ok(tvi.state == (TVIS_FOCUSED | TVIS_SELECTED | INDEXTOSTATEIMAGEMASK(2) | INDEXTOOVERLAYMASK(3)), "got 0x%x\n", tvi.state); ok(tvi.state == (TVIS_FOCUSED | TVIS_SELECTED | INDEXTOSTATEIMAGEMASK(2) | INDEXTOOVERLAYMASK(3)), "got 0x%x\n", tvi.state);
g_disp_set_stateimage = FALSE; g_disp_set_stateimage = FALSE;
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_get_dispinfo_seq, ok_sequence(sequences, PARENT_SEQ_INDEX, parent_get_dispinfo_seq,
......
...@@ -815,6 +815,12 @@ TREEVIEW_UpdateDispInfo(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem, ...@@ -815,6 +815,12 @@ TREEVIEW_UpdateDispInfo(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
if (mask & TVIF_CHILDREN) if (mask & TVIF_CHILDREN)
wineItem->cChildren = callback.item.cChildren; wineItem->cChildren = callback.item.cChildren;
if (callback.item.mask & TVIF_STATE)
{
wineItem->state &= ~callback.item.stateMask;
wineItem->state |= (callback.item.state & callback.item.stateMask);
}
/* These members are now permanently set. */ /* These members are now permanently set. */
if (callback.item.mask & TVIF_DI_SETITEM) if (callback.item.mask & TVIF_DI_SETITEM)
wineItem->callbackMask &= ~callback.item.mask; wineItem->callbackMask &= ~callback.item.mask;
......
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