Angelo Haller : comctl32/listview: Send one deselect all items notification for LVS_OWNERDATA listviews.
Alexandre Julliard
julliard at winehq.org
Mon Aug 8 15:19:03 CDT 2022
Module: wine
Branch: master
Commit: 8b392553b32677d25fd3e0fe14f70a5693f3b42c
URL: https://gitlab.winehq.org/wine/wine/-/commit/8b392553b32677d25fd3e0fe14f70a5693f3b42c
Author: Angelo Haller <angelo at szanni.org>
Date: Tue Jun 28 16:16:07 2022 -0500
comctl32/listview: Send one deselect all items notification for LVS_OWNERDATA listviews.
Send one deselect all items notification on selection change for LVS_OWNERDATA listviews instead
of notifying about each individual item change.
Signed-off-by: Angelo Haller <angelo at szanni.org>
---
dlls/comctl32/listview.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index ab328b3e798..3761a61286e 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -3406,7 +3406,14 @@ static BOOL LISTVIEW_DeselectAllSkipItems(LISTVIEW_INFO *infoPtr, RANGES toSkip)
lvItem.state = 0;
lvItem.stateMask = LVIS_SELECTED;
-
+
+ /* Only send one deselect all (-1) notification for LVS_OWNERDATA style */
+ if (infoPtr->dwStyle & LVS_OWNERDATA)
+ {
+ LISTVIEW_SetItemState(infoPtr, -1, &lvItem);
+ return TRUE;
+ }
+
/* need to clone the DPA because callbacks can change it */
if (!(clone = ranges_clone(infoPtr->selectionRanges))) return FALSE;
iterator_rangesitems(&i, ranges_diff(clone, toSkip));
More information about the wine-cvs
mailing list