Fix race in ANIMATE_WindowProc
Francois Gouget
fgouget at codeweavers.com
Mon Jan 12 18:52:54 CST 2004
Changelog:
Francois Gouget <fgouget at codeweavers.com>
* dlls/comctl32/animate.c
Fix a race that caused the Microsoft Viewers 'file extraction'
animation to sometimes have a pink background.
--
Francois Gouget
fgouget at codeweavers.com
-------------- next part --------------
Index: dlls/comctl32/animate.c
===================================================================
RCS file: /home/cvs/wine/dlls/comctl32/animate.c,v
retrieving revision 1.52
diff -u -r1.52 animate.c
--- dlls/comctl32/animate.c 20 Nov 2003 22:04:14 -0000 1.52
+++ dlls/comctl32/animate.c 12 Jan 2004 18:23:07 -0000
@@ -899,10 +899,15 @@
{
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,
More information about the wine-patches
mailing list