mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
fix mouse clipping
svn path=/trunk/; revision=9259
This commit is contained in:
parent
1eeed5accd
commit
b88aed24cb
1 changed files with 15 additions and 15 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: input.c,v 1.30 2004/04/30 22:18:00 weiden Exp $
|
||||
/* $Id: input.c,v 1.31 2004/05/01 08:47:14 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -602,20 +602,6 @@ IntMouseInput(MOUSEINPUT *mi)
|
|||
MousePos.y += mi->dy;
|
||||
}
|
||||
|
||||
if(CurInfo->CursorClipInfo.IsClipped)
|
||||
{
|
||||
/* The mouse cursor needs to be clipped */
|
||||
|
||||
if(MousePos.x > CurInfo->CursorClipInfo.Right)
|
||||
MousePos.x = CurInfo->CursorClipInfo.Right;
|
||||
if(MousePos.x <= CurInfo->CursorClipInfo.Left)
|
||||
MousePos.x = CurInfo->CursorClipInfo.Left;
|
||||
if(MousePos.y > CurInfo->CursorClipInfo.Bottom)
|
||||
MousePos.y = CurInfo->CursorClipInfo.Bottom;
|
||||
if(MousePos.y <= CurInfo->CursorClipInfo.Top)
|
||||
MousePos.y = CurInfo->CursorClipInfo.Top;
|
||||
}
|
||||
|
||||
if(MousePos.x < 0)
|
||||
MousePos.x = 0;
|
||||
if(MousePos.y < 0)
|
||||
|
@ -625,6 +611,20 @@ IntMouseInput(MOUSEINPUT *mi)
|
|||
if(MousePos.y >= SurfObj->sizlBitmap.cy)
|
||||
MousePos.y = SurfObj->sizlBitmap.cy - 1;
|
||||
|
||||
if(CurInfo->CursorClipInfo.IsClipped)
|
||||
{
|
||||
/* The mouse cursor needs to be clipped */
|
||||
|
||||
if(MousePos.x >= (LONG)CurInfo->CursorClipInfo.Right)
|
||||
MousePos.x = (LONG)CurInfo->CursorClipInfo.Right;
|
||||
if(MousePos.x < (LONG)CurInfo->CursorClipInfo.Left)
|
||||
MousePos.x = (LONG)CurInfo->CursorClipInfo.Left;
|
||||
if(MousePos.y >= (LONG)CurInfo->CursorClipInfo.Bottom)
|
||||
MousePos.y = (LONG)CurInfo->CursorClipInfo.Bottom;
|
||||
if(MousePos.y < (LONG)CurInfo->CursorClipInfo.Top)
|
||||
MousePos.y = (LONG)CurInfo->CursorClipInfo.Top;
|
||||
}
|
||||
|
||||
if((DoMove = (MousePos.x != CurInfo->x || MousePos.y != CurInfo->y)))
|
||||
{
|
||||
CurInfo->x = MousePos.x;
|
||||
|
|
Loading…
Reference in a new issue