Fix a race that caused the Microsoft Viewers 'file extraction'

animation to sometimes have a pink background.
oldstable
Francois Gouget 2004-01-13 05:07:56 +00:00 committed by Alexandre Julliard
parent fc1e5789fa
commit eb10f347e6
1 changed files with 9 additions and 4 deletions

View File

@ -899,10 +899,15 @@ static LRESULT WINAPI ANIMATE_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LP
{
ANIMATE_INFO* infoPtr = ANIMATE_GetInfoPtr(hWnd);
/* the animation isn't playing, don't paint */
if(!infoPtr->uTimer && !infoPtr->hThread)
/* default paint handling */
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
/* the animation isn't playing, or has not decompressed
* (and displayed) the first frame yet, don't paint
*/
if ((!infoPtr->uTimer && !infoPtr->hThread) ||
!infoPtr->hbmPrevFrame)
{
/* default paint handling */
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
}
if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT)
infoPtr->hbrushBG = (HBRUSH)SendMessageA(infoPtr->hwndNotify,