Duane Clark wrote:
Reading the MS docs, it appears to me that in this case RDW_FRAME should be ignored. What happens is the program has an area that needs to be repainted, but this part of the code causes only a portion to be repainted, leaving a portion of the screen still "invalidated". This causes another paint request, which since nothing has changed, still does not result in the correct repainting. And so it is stuck in an indefinite loop.
I probably should mention where in the MS docs I was getting this idea. For the function RedrawWindow:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/pantdra...
It says "The following flags are used to validate the window." and lists only RDW_NOERASE, RDW_NOFRAME (rather than RDW_FRAME), RDW_NOINTERNALPAINT, and RDW_VALIDATE.
So, I will go ahead and submit this patch, and since it is small, just attach it here again. I have been using it with Wine for about 3 months now, so it does not appear to adversely effect anything. Probably a better fix would be to correctly implement the other flags, though.
Changelog: RDW_FRAME should be ignored when validating a region.
Index: windows/painting.c =================================================================== RCS file: /home/wine/wine/windows/painting.c,v retrieving revision 1.71 diff -u -r1.71 painting.c --- windows/painting.c 5 Jul 2002 01:23:31 -0000 1.71 +++ windows/painting.c 25 Jul 2002 00:44:15 -0000 @@ -779,15 +779,9 @@ OffsetRect( &r2, pt.x, pt.y ); hRgn = CreateRectRgnIndirect( &r2 ); } - else /* entire window or client depending on RDW_FRAME */ + else /* entire window */ { - if( flags & RDW_FRAME ) hRgn = 1; - else - { - GETCLIENTRECTW( wndPtr, r2 ); - hRgn = CreateRectRgnIndirect( &r2 ); - } } }