In RDW_UpdateRgn(), if hRgn is zero, clear the windows update region

if it is an empty region.
This commit is contained in:
Rein Klazes 2004-01-21 02:18:51 +00:00 committed by Alexandre Julliard
parent d83ed49148
commit 15a4fef9a3

View File

@ -459,7 +459,21 @@ static void RDW_UpdateRgns( WND* wndPtr, HRGN hRgn, UINT flags, BOOL firstRecurs
wndPtr->hrgnUpdate = (HRGN)1;
}
else
hRgn = wndPtr->hrgnUpdate; /* this is a trick that depends on code in PAINT_RedrawWindow() */
{
/* hRgn is zero */
if( wndPtr->hrgnUpdate > (HRGN)1)
{
GetRgnBox( wndPtr->hrgnUpdate, &r );
if( IsRectEmpty( &r ) )
{
DeleteObject( wndPtr->hrgnUpdate );
wndPtr->hrgnUpdate = 0;
goto end;
}
}
hRgn = wndPtr->hrgnUpdate; /* this is a trick that depends
* on code in RDW_Paint() */
}
if( !bHadOne && !(wndPtr->flags & WIN_INTERNAL_PAINT) )
add_paint_count( wndPtr->hwndSelf, 1 );