mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 14:37:45 +00:00
fixed NtUserClipCursor()
svn path=/trunk/; revision=6113
This commit is contained in:
parent
87768e6cca
commit
a41feef44a
|
@ -237,8 +237,8 @@ NtUserClipCursor(
|
||||||
|
|
||||||
PWINSTATION_OBJECT WinStaObject;
|
PWINSTATION_OBJECT WinStaObject;
|
||||||
PSYSTEM_CURSORINFO CurInfo;
|
PSYSTEM_CURSORINFO CurInfo;
|
||||||
PWINDOW_OBJECT DesktopWindow;
|
|
||||||
RECT Rect;
|
RECT Rect;
|
||||||
|
PWINDOW_OBJECT DesktopWindow = NULL;
|
||||||
|
|
||||||
NTSTATUS Status = ValidateWindowStationHandle(PROCESS_WINDOW_STATION(),
|
NTSTATUS Status = ValidateWindowStationHandle(PROCESS_WINDOW_STATION(),
|
||||||
KernelMode,
|
KernelMode,
|
||||||
|
@ -260,12 +260,12 @@ NtUserClipCursor(
|
||||||
}
|
}
|
||||||
|
|
||||||
CurInfo = &WinStaObject->SystemCursor;
|
CurInfo = &WinStaObject->SystemCursor;
|
||||||
if(UnsafeRect)
|
if(WinStaObject->ActiveDesktop)
|
||||||
{
|
|
||||||
if((Rect.right > Rect.left) &&
|
|
||||||
(Rect.bottom > Rect.top))
|
|
||||||
{
|
|
||||||
DesktopWindow = IntGetWindowObject(WinStaObject->ActiveDesktop->DesktopWindow);
|
DesktopWindow = IntGetWindowObject(WinStaObject->ActiveDesktop->DesktopWindow);
|
||||||
|
|
||||||
|
if((Rect.right > Rect.left) && (Rect.bottom > Rect.top)
|
||||||
|
&& DesktopWindow)
|
||||||
|
{
|
||||||
CurInfo->CursorClipInfo.IsClipped = TRUE;
|
CurInfo->CursorClipInfo.IsClipped = TRUE;
|
||||||
CurInfo->CursorClipInfo.Left = max(Rect.left, DesktopWindow->WindowRect.left);
|
CurInfo->CursorClipInfo.Left = max(Rect.left, DesktopWindow->WindowRect.left);
|
||||||
CurInfo->CursorClipInfo.Top = max(Rect.top, DesktopWindow->WindowRect.top);
|
CurInfo->CursorClipInfo.Top = max(Rect.top, DesktopWindow->WindowRect.top);
|
||||||
|
@ -275,7 +275,6 @@ NtUserClipCursor(
|
||||||
|
|
||||||
MouseMoveCursor(CurInfo->x, CurInfo->y);
|
MouseMoveCursor(CurInfo->x, CurInfo->y);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
WinStaObject->SystemCursor.CursorClipInfo.IsClipped = FALSE;
|
WinStaObject->SystemCursor.CursorClipInfo.IsClipped = FALSE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue