Uncleared WM_PAINT loop problem

Dave Hawkes daveh-wine at cadlink.com
Wed Dec 12 13:13:20 CST 2001


Hi,

I have a problem where an edit control get stuck in an infinite WM_PAINT
loop.

BeginPaint never clears the paint count because of this code:

 if(((hrgnUpdate = wndPtr->hrgnUpdate) != 0) || (wndPtr->flags &
WIN_INTERNAL_PAINT))
        add_paint_count( hwnd, -1 );


if wndPtr->hrgnUpdate is 0 then the paint count is never decremented here
and nowhere else attempts to decrement it and we land up in an infinite
paint loop. I'm not sure how we get to this point the a NULL update region
(which may be a bug anyway), but there should still be a method of breaking
out of this loop once we are there.

I tried removing the test and always calling add_paint_count and this
appears to fix the problem.

Before I submit this change, does anyone know the original reason for this
test in the first place?

Thanks
Dave Hawkes








More information about the wine-devel mailing list