comctl32/treeview: Store item state supplied from TVN_GETDISPINFO handler.
This commit is contained in:
parent
1fa1c72d90
commit
f9b14fda02
|
@ -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,
|
||||||
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;
|
||||||
|
|
Loading…
Reference in New Issue