Commit 07eda428 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Fix the logic for setting the lps->fErase flag in BeginPaint.

parent 17c63bba
......@@ -225,13 +225,18 @@ HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps )
lps->hdc, lps->rcPaint.left, lps->rcPaint.top, lps->rcPaint.right, lps->rcPaint.bottom );
if (!(wndPtr = WIN_GetPtr( hwnd )) || wndPtr == WND_OTHER_PROCESS) return 0;
lps->fErase = !(wndPtr->flags & WIN_NEEDS_ERASEBKGND);
lps->fErase = (wndPtr->flags & WIN_NEEDS_ERASEBKGND) != 0;
wndPtr->flags &= ~WIN_NEEDS_ERASEBKGND;
WIN_ReleasePtr( wndPtr );
if (!lps->fErase)
if (lps->fErase)
lps->fErase = !SendMessageA( hwnd, bIcon ? WM_ICONERASEBKGND : WM_ERASEBKGND,
(WPARAM)lps->hdc, 0 );
TRACE("hdc = %p box = (%ld,%ld - %ld,%ld), fErase = %d\n",
lps->hdc, lps->rcPaint.left, lps->rcPaint.top, lps->rcPaint.right, lps->rcPaint.bottom,
lps->fErase);
return lps->hdc;
}
......
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