From dff743f85a4bc62e689ac907d1efc3caa565286d Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Mon, 2 May 2005 11:38:48 +0000 Subject: [PATCH] Don't call internal function which checks parameters since our parameter is kernel mode. svn path=/trunk/; revision=14945 --- reactos/subsys/win32k/ntuser/painting.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/reactos/subsys/win32k/ntuser/painting.c b/reactos/subsys/win32k/ntuser/painting.c index 2c603127650..18cab7b6698 100644 --- a/reactos/subsys/win32k/ntuser/painting.c +++ b/reactos/subsys/win32k/ntuser/painting.c @@ -1211,16 +1211,18 @@ NtUserScrollWindowEx(HWND hWnd, INT dx, INT dy, const RECT *UnsafeRect, { int i; RECT r, dummy; - POINT ClientOrigin; + PWINDOW_OBJECT WindowObject; for (i = 0; List[i]; i++) { NtUserGetWindowRect(List[i], &r); - IntGetClientOrigin(hWnd, &ClientOrigin); - r.left -= ClientOrigin.x; - r.top -= ClientOrigin.y; - r.right -= ClientOrigin.x; - r.bottom -= ClientOrigin.y; + WindowObject = IntGetWindowObject((hWnd ? hWnd : IntGetDesktopWindow())); + if (!WindowObject) continue; + r.left -= WindowObject->ClientRect.top; + r.top -= WindowObject->ClientRect.top; + r.right -= WindowObject->ClientRect.left; + r.bottom -= WindowObject->ClientRect.top; + IntReleaseWindowObject(WindowObject); if (! UnsafeRect || IntGdiIntersectRect(&dummy, &r, &rc)) WinPosSetWindowPos(List[i], 0, r.left + dx, r.top + dy, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE |