mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
fixed NtUserClipCursor()
svn path=/trunk/; revision=6109
This commit is contained in:
parent
3cd94c29a1
commit
3a04e43292
1 changed files with 4 additions and 4 deletions
|
@ -262,15 +262,15 @@ NtUserClipCursor(
|
||||||
CurInfo = &WinStaObject->SystemCursor;
|
CurInfo = &WinStaObject->SystemCursor;
|
||||||
if(UnsafeRect)
|
if(UnsafeRect)
|
||||||
{
|
{
|
||||||
if((Rect.right >= Rect.left) &&
|
if((Rect.right > Rect.left) &&
|
||||||
(Rect.bottom >= Rect.top))
|
(Rect.bottom > Rect.top))
|
||||||
{
|
{
|
||||||
DesktopWindow = IntGetWindowObject(WinStaObject->ActiveDesktop->DesktopWindow);
|
DesktopWindow = IntGetWindowObject(WinStaObject->ActiveDesktop->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);
|
||||||
CurInfo->CursorClipInfo.Right = min(Rect.right, DesktopWindow->WindowRect.right);
|
CurInfo->CursorClipInfo.Right = min(Rect.right - 1, DesktopWindow->WindowRect.right - 1);
|
||||||
CurInfo->CursorClipInfo.Bottom = min(Rect.bottom, DesktopWindow->WindowRect.bottom);
|
CurInfo->CursorClipInfo.Bottom = min(Rect.bottom - 1, DesktopWindow->WindowRect.bottom - 1);
|
||||||
IntReleaseWindowObject(DesktopWindow);
|
IntReleaseWindowObject(DesktopWindow);
|
||||||
|
|
||||||
MouseMoveCursor(CurInfo->x, CurInfo->y);
|
MouseMoveCursor(CurInfo->x, CurInfo->y);
|
||||||
|
|
Loading…
Reference in a new issue