Re: [2/2] comctl32/listview: Block redrawing entirely after WM_SETREDRAW wParam=FALSE
Nikolay Sivov <bunglehead(a)gmail.com> writes:
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index a65d832..9bca376 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -9740,6 +9740,8 @@ static LRESULT LISTVIEW_Paint(LISTVIEW_INFO *infoPtr, HDC hdc) { TRACE("(hdc=%p)\n", hdc);
+ if (!is_redrawing(infoPtr)) return 0; + if (infoPtr->bNoItemMetrics && infoPtr->nItemCount) { infoPtr->bNoItemMetrics = FALSE; @@ -9790,7 +9792,13 @@ static LRESULT LISTVIEW_PrintClient(LISTVIEW_INFO *infoPtr, HDC hdc, DWORD optio LISTVIEW_EraseBkgnd(infoPtr, hdc);
if (options & PRF_CLIENT) + { + BOOL redraw_old = infoPtr->bRedraw; + + infoPtr->bRedraw = TRUE; LISTVIEW_Paint(infoPtr, hdc); + infoPtr->bRedraw = redraw_old; + }
That's not very nice. You should move the checks so that you don't have to change the flag to paint. -- Alexandre Julliard julliard(a)winehq.org
Alexandre Julliard wrote:
Nikolay Sivov <bunglehead(a)gmail.com> writes:
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index a65d832..9bca376 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -9740,6 +9740,8 @@ static LRESULT LISTVIEW_Paint(LISTVIEW_INFO *infoPtr, HDC hdc) { TRACE("(hdc=%p)\n", hdc);
+ if (!is_redrawing(infoPtr)) return 0; + if (infoPtr->bNoItemMetrics && infoPtr->nItemCount) { infoPtr->bNoItemMetrics = FALSE; @@ -9790,7 +9792,13 @@ static LRESULT LISTVIEW_PrintClient(LISTVIEW_INFO *infoPtr, HDC hdc, DWORD optio LISTVIEW_EraseBkgnd(infoPtr, hdc);
if (options & PRF_CLIENT) + { + BOOL redraw_old = infoPtr->bRedraw; + + infoPtr->bRedraw = TRUE; LISTVIEW_Paint(infoPtr, hdc); + infoPtr->bRedraw = redraw_old; + }
That's not very nice. You should move the checks so that you don't have to change the flag to paint.
Ok, will be done.
participants (2)
-
Alexandre Julliard -
Nikolay Sivov