comctl32/listview: Block redrawing entirely after WM_SETREDRAW wParam=FALSE.

This commit is contained in:
Nikolay Sivov 2009-08-13 01:38:08 +04:00 committed by Alexandre Julliard
parent c92bb271b7
commit e8846b7c78
2 changed files with 23 additions and 4 deletions

View File

@ -9727,7 +9727,7 @@ static LRESULT LISTVIEW_NotifyFormat(LISTVIEW_INFO *infoPtr, HWND hwndFrom, INT
/***
* DESCRIPTION:
* Paints/Repaints the listview control.
* Paints/Repaints the listview control. Internal use.
*
* PARAMETER(S):
* [I] infoPtr : valid pointer to the listview structure
@ -9766,6 +9766,25 @@ static LRESULT LISTVIEW_Paint(LISTVIEW_INFO *infoPtr, HDC hdc)
return 0;
}
/***
* DESCRIPTION:
* Paints/Repaints the listview control, WM_PAINT handler.
*
* PARAMETER(S):
* [I] infoPtr : valid pointer to the listview structure
* [I] hdc : device context handle
*
* RETURN:
* Zero
*/
static inline LRESULT LISTVIEW_WMPaint(LISTVIEW_INFO *infoPtr, HDC hdc)
{
TRACE("(hdc=%p)\n", hdc);
if (!is_redrawing(infoPtr)) return 0;
return LISTVIEW_Paint(infoPtr, hdc);
}
/***
* DESCRIPTION:
@ -10802,7 +10821,7 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return LISTVIEW_PrintClient(infoPtr, (HDC)wParam, (DWORD)lParam);
case WM_PAINT:
return LISTVIEW_Paint(infoPtr, (HDC)wParam);
return LISTVIEW_WMPaint(infoPtr, (HDC)wParam);
case WM_RBUTTONDBLCLK:
return LISTVIEW_RButtonDblClk(infoPtr, (WORD)wParam, (SHORT)LOWORD(lParam), (SHORT)HIWORD(lParam));

View File

@ -2834,7 +2834,7 @@ static void test_setredraw(void)
InvalidateRect(hwnd, NULL, TRUE);
UpdateWindow(hwnd);
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
"redraw after WM_SETREDRAW (FALSE)", TRUE);
"redraw after WM_SETREDRAW (FALSE)", FALSE);
ret = SendMessage(hwnd, LVM_SETBKCOLOR, 0, CLR_NONE);
expect(TRUE, ret);
@ -2842,7 +2842,7 @@ static void test_setredraw(void)
InvalidateRect(hwnd, NULL, TRUE);
UpdateWindow(hwnd);
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
"redraw after WM_SETREDRAW (FALSE) with CLR_NONE bkgnd", TRUE);
"redraw after WM_SETREDRAW (FALSE) with CLR_NONE bkgnd", FALSE);
/* message isn't forwarded to header */
subclass_header(hwnd);