Do not send LVN_DELETEITEM on LVM_DELETEALLITEMS for virtual listviews
Igor Tarasov
tarasov.igor at gmail.com
Wed Feb 18 21:41:25 CST 2009
MSDN on LVM_DELETEALLITEMS for virtual listviews: "Sets the item count
to zero and clears all internal selection variables, but it does not
actually delete any items. It makes a notification callback.". There
should be single LVN_DELETEALLITEMS notification. But hundreds of
thousands notifications create an issue.
http://msdn.microsoft.com/en-us/library/bb774735(VS.85).aspx#Compatibility_issues
This patch is part of fix for bug #12701
http://bugs.winehq.org/show_bug.cgi?id=12701
-------------- next part --------------
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index af84938..6724139 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -4532,10 +4532,11 @@ static BOOL LISTVIEW_DeleteAllItems(LISTVIEW_INFO *infoPtr, BOOL destroy)
for (i = infoPtr->nItemCount - 1; i >= 0; i--)
{
- /* send LVN_DELETEITEM notification, if not suppressed */
- if (!bSuppress) notify_deleteitem(infoPtr, i);
if (!(infoPtr->dwStyle & LVS_OWNERDATA))
{
+ /* send LVN_DELETEITEM notification, if not suppressed
+ and if it is not a virtual listview */
+ if (!bSuppress) notify_deleteitem(infoPtr, i);
hdpaSubItems = DPA_GetPtr(infoPtr->hdpaItems, i);
for (j = 0; j < DPA_GetPtrCount(hdpaSubItems); j++)
{
More information about the wine-patches
mailing list