From: Jacob Czekalla <jczekalla(a)codeweavers.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53727 --- dlls/comctl32/tests/treeview.c | 2 +- dlls/comctl32/treeview.c | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index b8c8175400f..d5926efdb66 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -1923,7 +1923,7 @@ static void test_expandnotify(void) /* check that it's expanded */ item.state = TVIS_EXPANDED; ret = SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&item); - todo_wine ok(!(item.state & TVIS_EXPANDED), "expected no expansion\n"); + ok(!(item.state & TVIS_EXPANDED), "expected no expansion\n"); DestroyWindow(hTree); diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 036afd15c69..5bd0c121d4f 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -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; @@ -3512,13 +3512,7 @@ TREEVIEW_Expand(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item, sendsNotifications = user || ((item->cChildren != 0) && !(item->state & TVIS_EXPANDEDONCE)); if (sendsNotifications) - { - if (!TREEVIEW_SendExpanding(infoPtr, item, TVE_EXPAND)) - { - TRACE(" TVN_ITEMEXPANDING returned TRUE, exiting...\n"); - return FALSE; - } - } + return !TREEVIEW_SendExpanding(infoPtr, item, TVE_EXPAND); if (!item->firstChild) return FALSE; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6218