From: Angelo Haller Subject: [PATCH v4 4/7] comctl32/listview: Send LVN_ODSTATECHANGED only for virtual lists. Message-Id: <20220628211612.346733-5-wine-devel@szanni.org> Date: Tue, 28 Jun 2022 16:16:09 -0500 In-Reply-To: <20220628211612.346733-1-wine-devel@szanni.org> References: <20220628211612.346733-1-wine-devel@szanni.org> From: Angelo Haller The LVN_ODSTATECHANGED notification should only be sent to lists that have LVS_OWNERDATA set. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53123 Signed-off-by: Angelo Haller --- v3: Add wine bug reference. Use function call guard instead of early return. --- dlls/comctl32/listview.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 03ce801e4cc..5ba1924cbd7 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -3581,7 +3581,8 @@ static BOOL LISTVIEW_AddGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem) for (i = nFirst; i <= nLast; i++) LISTVIEW_SetItemState(infoPtr,i,&item); - LISTVIEW_SetOwnerDataState(infoPtr, nFirst, nLast, &item); + if (infoPtr->dwStyle & LVS_OWNERDATA) + LISTVIEW_SetOwnerDataState(infoPtr, nFirst, nLast, &item); if (!IsWindow(hwndSelf)) return FALSE; -- 2.36.1