Commit 0a92c01a authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

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

parent 43a199d5
...@@ -7913,30 +7913,29 @@ static BOOL LISTVIEW_Scroll(LISTVIEW_INFO *infoPtr, INT dx, INT dy) ...@@ -7913,30 +7913,29 @@ static BOOL LISTVIEW_Scroll(LISTVIEW_INFO *infoPtr, INT dx, INT dy)
* *
* PARAMETER(S): * PARAMETER(S):
* [I] infoPtr : valid pointer to the listview structure * [I] infoPtr : valid pointer to the listview structure
* [I] clrBk : background color * [I] color : background color
* *
* RETURN: * RETURN:
* SUCCESS : TRUE * SUCCESS : TRUE
* FAILURE : FALSE * 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); if (infoPtr->clrBk != CLR_NONE) DeleteObject(infoPtr->hBkBrush);
infoPtr->clrBk = clrBk; infoPtr->clrBk = color;
if (clrBk == CLR_NONE) if (color == CLR_NONE)
infoPtr->hBkBrush = (HBRUSH)GetClassLongPtrW(infoPtr->hwndSelf, GCLP_HBRBACKGROUND); infoPtr->hBkBrush = (HBRUSH)GetClassLongPtrW(infoPtr->hwndSelf, GCLP_HBRBACKGROUND);
else else
{ {
infoPtr->hBkBrush = CreateSolidBrush(clrBk); infoPtr->hBkBrush = CreateSolidBrush(color);
infoPtr->dwLvExStyle &= ~LVS_EX_TRANSPARENTBKGND; infoPtr->dwLvExStyle &= ~LVS_EX_TRANSPARENTBKGND;
} }
LISTVIEW_InvalidateList(infoPtr);
} }
return TRUE; return TRUE;
} }
/* LISTVIEW_SetBkImage */ /* LISTVIEW_SetBkImage */
......
...@@ -1793,7 +1793,7 @@ static void test_color(void) ...@@ -1793,7 +1793,7 @@ static void test_color(void)
rect.right = rect.bottom = 1; rect.right = rect.bottom = 1;
r = GetUpdateRect(hwnd, &rect, TRUE); r = GetUpdateRect(hwnd, &rect, TRUE);
todo_wine expect(FALSE, r); 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); r = ValidateRect(hwnd, NULL);
expect(TRUE, r); expect(TRUE, r);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment