[PATCH 4/4] Don't invalidate list on LVM_SETBKCOLOR
Nikolay Sivov
nsivov at codeweavers.com
Wed Jul 20 07:06:39 CDT 2011
---
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);
--
1.5.6.5
--------------040703060004030202010500--
More information about the wine-patches
mailing list