Piotr Caban : comctl32: Don' t invalidate item in LISTVIEW_SetItemT when its state has not changed.
Alexandre Julliard
julliard at winehq.org
Thu Jul 21 10:50:51 CDT 2011
Module: wine
Branch: master
Commit: c47c62a802e28053cc3bf61f8114e49ab983d431
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c47c62a802e28053cc3bf61f8114e49ab983d431
Author: Piotr Caban <piotr at codeweavers.com>
Date: Thu Jul 21 13:49:59 2011 +0200
comctl32: Don't invalidate item in LISTVIEW_SetItemT when its state has not changed.
---
dlls/comctl32/listview.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 8eec25b..eb94d1d 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -4401,14 +4401,15 @@ static BOOL LISTVIEW_SetItemT(LISTVIEW_INFO *infoPtr, LVITEMW *lpLVItem, BOOL is
HWND hwndSelf = infoPtr->hwndSelf;
LPWSTR pszText = NULL;
BOOL bResult, bChanged = FALSE;
+ RECT oldItemArea;
TRACE("(lpLVItem=%s, isW=%d)\n", debuglvitem_t(lpLVItem, isW), isW);
if (!lpLVItem || lpLVItem->iItem < 0 || lpLVItem->iItem >= infoPtr->nItemCount)
return FALSE;
- /* Invalidate old item area */
- LISTVIEW_InvalidateItem(infoPtr, lpLVItem->iItem);
+ /* Store old item area */
+ LISTVIEW_GetItemBox(infoPtr, lpLVItem->iItem, &oldItemArea);
/* For efficiency, we transform the lpLVItem->pszText to Unicode here */
if ((lpLVItem->mask & LVIF_TEXT) && is_text(lpLVItem->pszText))
@@ -4436,7 +4437,10 @@ static BOOL LISTVIEW_SetItemT(LISTVIEW_INFO *infoPtr, LVITEMW *lpLVItem, BOOL is
lpLVItem->iSubItem > 0 && lpLVItem->iSubItem <= DPA_GetPtrCount(infoPtr->hdpaColumns) )
LISTVIEW_InvalidateSubItem(infoPtr, lpLVItem->iItem, lpLVItem->iSubItem);
else
+ {
+ LISTVIEW_InvalidateRect(infoPtr, &oldItemArea);
LISTVIEW_InvalidateItem(infoPtr, lpLVItem->iItem);
+ }
}
/* restore text */
if (pszText)
More information about the wine-cvs
mailing list