Nikolay Sivov : comctl32/listview: Block redrawing entirely after WM_SETREDRAW wParam=FALSE.
Alexandre Julliard
julliard at winehq.org
Thu Aug 13 10:40:38 CDT 2009
Module: wine
Branch: master
Commit: e8846b7c78b008bbd5deb7d9f9c7a7793db32c68
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e8846b7c78b008bbd5deb7d9f9c7a7793db32c68
Author: Nikolay Sivov <bunglehead at gmail.com>
Date: Thu Aug 13 01:38:08 2009 +0400
comctl32/listview: Block redrawing entirely after WM_SETREDRAW wParam=FALSE.
---
dlls/comctl32/listview.c | 23 +++++++++++++++++++++--
dlls/comctl32/tests/listview.c | 4 ++--
2 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index a65d832..36e7b7e 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -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));
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 516445c..fb90196 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -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);
More information about the wine-cvs
mailing list