[ros-diffs] [gvg] 19893: Only offset the rect if it's not empty, otherwise we might return negative

gvg at svn.reactos.com gvg at svn.reactos.com
Sun Dec 4 23:30:34 CET 2005


Only offset the rect if it's not empty, otherwise we might return
negative
values
Modified: trunk/reactos/subsys/win32k/ntuser/painting.c
  _____  

Modified: trunk/reactos/subsys/win32k/ntuser/painting.c
--- trunk/reactos/subsys/win32k/ntuser/painting.c	2005-12-04
22:29:23 UTC (rev 19892)
+++ trunk/reactos/subsys/win32k/ntuser/painting.c	2005-12-04
22:30:27 UTC (rev 19893)
@@ -769,9 +769,12 @@

          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
       {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051204/e1bdcc76/attachment.html


More information about the Ros-diffs mailing list