From: Jacob Czekalla jczekalla@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53727 --- dlls/comctl32/tests/treeview.c | 10 +++++----- dlls/comctl32/treeview.c | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index cb56748aab7..20a8b2764f8 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -1922,7 +1922,7 @@ static void test_expandnotify(void) /* check if it's expanded */ ret = SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&item); expect(TRUE, ret); - todo_wine ok(!(item.state & TVIS_EXPANDED), "expected no expansion\n"); + ok(!(item.state & TVIS_EXPANDED), "expected no expansion\n");
DestroyWindow(hTree);
@@ -1939,7 +1939,7 @@ static void test_expandnotify(void)
ret = SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&item); expect(TRUE, ret); - todo_wine ok(item.state & TVIS_EXPANDED, "expected expansion\n"); + ok(item.state & TVIS_EXPANDED, "expected expansion\n");
memset(&item, 0, sizeof(item)); item.hItem = hRoot; @@ -1952,7 +1952,7 @@ static void test_expandnotify(void)
ret = SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&item); expect(TRUE, ret); - todo_wine ok(!(item.state & TVIS_EXPANDED), "expected no expansion\n"); + ok(!(item.state & TVIS_EXPANDED), "expected no expansion\n");
DestroyWindow(hTree);
@@ -1970,7 +1970,7 @@ static void test_expandnotify(void)
ret = SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&item); expect(TRUE, ret); - todo_wine ok(item.state & TVIS_EXPANDED, "expected expansion\n"); + ok(item.state & TVIS_EXPANDED, "expected expansion\n");
memset(&item, 0, sizeof(item)); item.hItem = hRoot; @@ -1985,7 +1985,7 @@ static void test_expandnotify(void)
ret = SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&item); expect(TRUE, ret); - todo_wine ok(item.state & TVIS_EXPANDED, "expected expansion\n"); + ok(item.state & TVIS_EXPANDED, "expected expansion\n");
DestroyWindow(hTree);
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index e2a4280f131..073f62c66a2 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -3348,10 +3348,10 @@ static BOOL TREEVIEW_SendExpanding(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item, UINT action) { - return !TREEVIEW_SendTreeviewNotify(infoPtr, TVN_ITEMEXPANDINGW, action, - TVIF_HANDLE | TVIF_STATE | TVIF_PARAM - | TVIF_IMAGE | TVIF_SELECTEDIMAGE, - 0, item); + return TREEVIEW_SendTreeviewNotify(infoPtr, TVN_ITEMEXPANDINGW, action, + TVIF_HANDLE | TVIF_STATE | TVIF_PARAM + | TVIF_IMAGE | TVIF_SELECTEDIMAGE, + 0, item); }
static VOID @@ -3383,8 +3383,8 @@ TREEVIEW_Collapse(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item, if (!TREEVIEW_HasChildren(infoPtr, item)) return FALSE;
- if (bUser) - TREEVIEW_SendExpanding(infoPtr, item, action); + if (bUser && TREEVIEW_SendExpanding(infoPtr, item, action)) + return TRUE;
if (item->firstChild == NULL) return FALSE; @@ -3513,11 +3513,11 @@ TREEVIEW_Expand(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item, !(item->state & TVIS_EXPANDEDONCE)); if (sendsNotifications) { - if (!TREEVIEW_SendExpanding(infoPtr, item, TVE_EXPAND)) - { - TRACE(" TVN_ITEMEXPANDING returned TRUE, exiting...\n"); - return FALSE; - } + if (TREEVIEW_SendExpanding(infoPtr, item, TVE_EXPAND)) + { + TRACE(" TVN_ITEMEXPANDING returned TRUE, exiting...\n"); + return TRUE; + } } if (!item->firstChild) return FALSE;