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 ) ...@@ -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 ); 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; 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; wndPtr->flags &= ~WIN_NEEDS_ERASEBKGND;
WIN_ReleasePtr( wndPtr ); WIN_ReleasePtr( wndPtr );
if (!lps->fErase) if (lps->fErase)
lps->fErase = !SendMessageA( hwnd, bIcon ? WM_ICONERASEBKGND : WM_ERASEBKGND, lps->fErase = !SendMessageA( hwnd, bIcon ? WM_ICONERASEBKGND : WM_ERASEBKGND,
(WPARAM)lps->hdc, 0 ); (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; 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