Fix coordinate mapping of unmodRect in DefWndDoSizeMove.
Modified: trunk/reactos/lib/user32/windows/defwnd.c

Modified: trunk/reactos/lib/user32/windows/defwnd.c
--- trunk/reactos/lib/user32/windows/defwnd.c	2005-05-01 08:03:41 UTC (rev 14899)
+++ trunk/reactos/lib/user32/windows/defwnd.c	2005-05-01 08:25:33 UTC (rev 14900)
@@ -479,19 +479,15 @@
 	}
     }
 
-  if (Style & WS_CHILD)
-    {
-      hWndParent = GetParent(hwnd);
-    }
-  
   /* Get min/max info */
   
   WinPosGetMinMaxInfo(hwnd, NULL, NULL, &minTrack, &maxTrack);
   GetWindowRect(hwnd, &sizingRect);
-  unmodRect = sizingRect;
   if (Style & WS_CHILD)
     {
+      hWndParent = GetParent(hwnd);
       MapWindowPoints( 0, hWndParent, (LPPOINT)&sizingRect, 2 );
+      unmodRect = sizingRect;
       GetClientRect(hWndParent, &mouseRect );
       clipRect = mouseRect;
       MapWindowPoints(hWndParent, HWND_DESKTOP, (LPPOINT)&clipRect, 2);
@@ -508,6 +504,7 @@
         SetRect(&mouseRect, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
         clipRect = mouseRect;
       }
+      unmodRect = sizingRect;
     }
   ClipCursor(&clipRect);