Only offset the rect if it's not empty, otherwise we might return negative

values

svn path=/trunk/; revision=19893
This commit is contained in:
Gé van Geldorp 2005-12-04 22:30:27 +00:00
parent 7bb411e4c8
commit a213198509

View file

@ -769,10 +769,13 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* UnsafePs)
UnsafeIntGetRgnBox(Rgn, &Ps.rcPaint);
RGNDATA_UnlockRgn(Rgn);
IntGdiIntersectRect(&Ps.rcPaint, &Ps.rcPaint, &Window->ClientRect);
if (! IntGdiIsEmptyRect(&Ps.rcPaint))
{
IntGdiOffsetRect(&Ps.rcPaint,
-Window->ClientRect.left,
-Window->ClientRect.top);
}
}
else
{
IntGetClientRect(Window, &Ps.rcPaint);