[ros-diffs] [navaraf] 14947: Fix Alex's completely wrong fix for NtUserScrollWindowEx (aka bug #606).

navaraf at svn.reactos.com navaraf at svn.reactos.com
Mon May 2 16:05:40 CEST 2005


Fix Alex's completely wrong fix for NtUserScrollWindowEx (aka bug #606).
Modified: trunk/reactos/subsys/win32k/ntuser/painting.c
  _____  

Modified: trunk/reactos/subsys/win32k/ntuser/painting.c
--- trunk/reactos/subsys/win32k/ntuser/painting.c	2005-05-02
11:42:41 UTC (rev 14946)
+++ trunk/reactos/subsys/win32k/ntuser/painting.c	2005-05-02
14:05:38 UTC (rev 14947)
@@ -1211,17 +1211,19 @@

       {
          int i;
          RECT r, dummy;
+         POINT ClientOrigin;
          PWINDOW_OBJECT WindowObject;
 
+         IntGetClientOrigin(hWnd, &ClientOrigin);
          for (i = 0; List[i]; i++)
          {
-            NtUserGetWindowRect(List[i], &r);
-            WindowObject = IntGetWindowObject((hWnd ? hWnd :
IntGetDesktopWindow()));
+            WindowObject = IntGetWindowObject(List[i]);
             if (!WindowObject) continue;
-            r.left -= WindowObject->ClientRect.top;
-            r.top -= WindowObject->ClientRect.top;
-            r.right -= WindowObject->ClientRect.left;
-            r.bottom -= WindowObject->ClientRect.top;
+            r = WindowObject->WindowRect;
+            r.left -= ClientOrigin.x;
+            r.top -= ClientOrigin.y;
+            r.right -= ClientOrigin.x;
+            r.bottom -= ClientOrigin.y;
             IntReleaseWindowObject(WindowObject);
             if (! UnsafeRect || IntGdiIntersectRect(&dummy, &r, &rc))
                WinPosSetWindowPos(List[i], 0, r.left + dx, r.top + dy,
0, 0,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050502/bb1f3cb2/attachment.html


More information about the Ros-diffs mailing list