Nikolay Sivov : comctl32/listview: Don't invalidate list on LVM_SETBKCOLOR.

Alexandre Julliard julliard at winehq.org
Wed Jul 20 12:54:42 CDT 2011


Module: wine
Branch: master
Commit: 0a92c01a57531c6cb4ad24a6cee9ae9cc9961049
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0a92c01a57531c6cb4ad24a6cee9ae9cc9961049

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Jul 20 16:06:39 2011 +0400

comctl32/listview: Don't invalidate list on LVM_SETBKCOLOR.

---

 dlls/comctl32/listview.c       |   17 ++++++++---------
 dlls/comctl32/tests/listview.c |    2 +-
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index cbc6b24..8eec25b 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -7913,30 +7913,29 @@ static BOOL LISTVIEW_Scroll(LISTVIEW_INFO *infoPtr, INT dx, INT dy)
  *
  * PARAMETER(S):
  * [I] infoPtr : valid pointer to the listview structure
- * [I] clrBk : background color
+ * [I] color   : background color
  *
  * RETURN:
  *   SUCCESS : TRUE
  *   FAILURE : FALSE
  */
-static BOOL LISTVIEW_SetBkColor(LISTVIEW_INFO *infoPtr, COLORREF clrBk)
+static BOOL LISTVIEW_SetBkColor(LISTVIEW_INFO *infoPtr, COLORREF color)
 {
-    TRACE("(clrBk=%x)\n", clrBk);
+    TRACE("(color=%x)\n", color);
 
-    if(infoPtr->clrBk != clrBk) {
+    if(infoPtr->clrBk != color) {
 	if (infoPtr->clrBk != CLR_NONE) DeleteObject(infoPtr->hBkBrush);
-	infoPtr->clrBk = clrBk;
-	if (clrBk == CLR_NONE)
+	infoPtr->clrBk = color;
+	if (color == CLR_NONE)
 	    infoPtr->hBkBrush = (HBRUSH)GetClassLongPtrW(infoPtr->hwndSelf, GCLP_HBRBACKGROUND);
 	else
 	{
-	    infoPtr->hBkBrush = CreateSolidBrush(clrBk);
+	    infoPtr->hBkBrush = CreateSolidBrush(color);
 	    infoPtr->dwLvExStyle &= ~LVS_EX_TRANSPARENTBKGND;
 	}
-	LISTVIEW_InvalidateList(infoPtr);
     }
 
-   return TRUE;
+    return TRUE;
 }
 
 /* LISTVIEW_SetBkImage */
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 6617798..850c717 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -1793,7 +1793,7 @@ static void test_color(void)
     rect.right = rect.bottom = 1;
     r = GetUpdateRect(hwnd, &rect, TRUE);
     todo_wine expect(FALSE, r);
-    todo_wine ok(rect.right == 0 && rect.bottom == 0, "got update rectangle\n");
+    ok(rect.right == 0 && rect.bottom == 0, "got update rectangle\n");
 
     r = ValidateRect(hwnd, NULL);
     expect(TRUE, r);




More information about the wine-cvs mailing list