mirror of
https://github.com/reactos/reactos.git
synced 2025-01-13 01:22:03 +00:00
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:
parent
7bb411e4c8
commit
a213198509
1 changed files with 6 additions and 3 deletions
|
@ -769,9 +769,12 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* UnsafePs)
|
|||
UnsafeIntGetRgnBox(Rgn, &Ps.rcPaint);
|
||||
RGNDATA_UnlockRgn(Rgn);
|
||||
IntGdiIntersectRect(&Ps.rcPaint, &Ps.rcPaint, &Window->ClientRect);
|
||||
IntGdiOffsetRect(&Ps.rcPaint,
|
||||
-Window->ClientRect.left,
|
||||
-Window->ClientRect.top);
|
||||
if (! IntGdiIsEmptyRect(&Ps.rcPaint))
|
||||
{
|
||||
IntGdiOffsetRect(&Ps.rcPaint,
|
||||
-Window->ClientRect.left,
|
||||
-Window->ClientRect.top);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue