From: Esme Povirk esme@codeweavers.com
--- dlls/comctl32/listview.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 54cd452ce81..216c97b6774 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -5629,6 +5629,13 @@ static BOOL LISTVIEW_DeleteAllItems(LISTVIEW_INFO *infoPtr, BOOL destroy) } LISTVIEW_InvalidateList(infoPtr); infoPtr->bNoItemMetrics = TRUE; + + if (!destroy) + { + NotifyWinEvent( EVENT_OBJECT_REORDER, infoPtr->hwndSelf, OBJID_CLIENT, 0 ); + NotifyWinEvent( EVENT_OBJECT_DESTROY, infoPtr->hwndSelf, OBJID_CLIENT, 0 ); + NotifyWinEvent( EVENT_OBJECT_CREATE, infoPtr->hwndSelf, OBJID_CLIENT, 0 ); + }
return TRUE; } @@ -5920,6 +5927,9 @@ static BOOL LISTVIEW_DeleteItem(LISTVIEW_INFO *infoPtr, INT nItem) /* now is the invalidation fun */ if (!is_icon) LISTVIEW_ScrollOnInsert(infoPtr, nItem, -1); + + NotifyWinEvent( EVENT_OBJECT_DESTROY, infoPtr->hwndSelf, OBJID_CLIENT, nItem + 1 ); + return TRUE; }
@@ -7817,7 +7827,11 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem,
TRACE("(item=%s, isW=%d)\n", debuglvitem_t(lpLVItem, isW), isW);
- if (infoPtr->dwStyle & LVS_OWNERDATA) return infoPtr->nItemCount++; + if (infoPtr->dwStyle & LVS_OWNERDATA) + { + NotifyWinEvent( EVENT_OBJECT_CREATE, hwndSelf, OBJID_CLIENT, infoPtr->nItemCount + 1 ); + return infoPtr->nItemCount++; + }
/* make sure it's an item, and not a subitem; cannot insert a subitem */ if (!lpLVItem || lpLVItem->iSubItem) return -1; @@ -7949,6 +7963,9 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem,
/* now is the invalidation fun */ LISTVIEW_ScrollOnInsert(infoPtr, nItem, 1); + + NotifyWinEvent( EVENT_OBJECT_CREATE, hwndSelf, OBJID_CLIENT, nItem + 1 ); + return nItem;
undo: @@ -9353,6 +9370,8 @@ static INT LISTVIEW_SetView(LISTVIEW_INFO *infoPtr, DWORD nView) LISTVIEW_UpdateScroll(infoPtr); LISTVIEW_InvalidateList(infoPtr);
+ NotifyWinEvent( EVENT_OBJECT_REORDER, infoPtr->hwndSelf, OBJID_CLIENT, 0 ); + TRACE("nView %ld\n", nView);
return 1;