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

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


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

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

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

---

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

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index f6eebe8..cbc6b24 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -8914,22 +8914,17 @@ static BOOL LISTVIEW_SetTextBkColor(LISTVIEW_INFO *infoPtr, COLORREF color)
  *
  * PARAMETER(S):
  * [I] infoPtr : valid pointer to the listview structure
- * [I] clrText : text color
+ * [I] color   : text color
  *
  * RETURN:
  *   SUCCESS : TRUE
  *   FAILURE : FALSE
  */
-static BOOL LISTVIEW_SetTextColor (LISTVIEW_INFO *infoPtr, COLORREF clrText)
+static BOOL LISTVIEW_SetTextColor (LISTVIEW_INFO *infoPtr, COLORREF color)
 {
-    TRACE("(clrText=%x)\n", clrText);
-
-    if (infoPtr->clrText != clrText)
-    {
-	infoPtr->clrText = clrText;
-	LISTVIEW_InvalidateList(infoPtr);
-    }
+    TRACE("(color=%x)\n", color);
 
+    infoPtr->clrText = color;
     return TRUE;
 }
 
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index e33e334..6617798 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -1803,7 +1803,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