- Minor corrections to emulated mouse pointer handling.

svn path=/trunk/; revision=8749
This commit is contained in:
Filip Navara 2004-03-15 20:21:51 +00:00
parent 60a43e438d
commit 41562afcd3
2 changed files with 22 additions and 23 deletions

View file

@ -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: mouse.c,v 1.63 2004/03/05 09:02:41 hbirr Exp $
/* $Id: mouse.c,v 1.64 2004/03/15 20:21:50 navaraf Exp $
*
* PROJECT: ReactOS kernel
* PURPOSE: Mouse
@ -282,7 +282,8 @@ MouseMoveCursor(LONG X, LONG Y)
{
ExAcquireFastMutex(&CurInfo->CursorMutex);
IntLockGDIDriver(SurfGDI);
SurfGDI->MovePointer(SurfObj, CurInfo->x, CurInfo->y, &PointerRect);
if (SurfGDI->MovePointer != NULL)
SurfGDI->MovePointer(SurfObj, CurInfo->x, CurInfo->y, &PointerRect);
IntUnLockGDIDriver(SurfGDI);
SetPointerRect(CurInfo, &PointerRect);
ExReleaseFastMutex(&CurInfo->CursorMutex);
@ -849,14 +850,6 @@ EngMovePointer(
IN RECTL *prcl)
{
GDIDEVICE *ppdev = (GDIDEVICE *)pso->hdev;
PSURFGDI SurfGDI = AccessInternalObjectFromUserObject(pso);
/*
* Prevent GDI from trying to remve the mouse cursor,
* because it would cause unexpected reentrancy effects.
*/
SurfGDI->PointerStatus = SPS_ACCEPT_NOEXCLUDE;
IntHideMousePointer(ppdev, pso);
ppdev->PointerAttributes.Column = x - ppdev->PointerHotSpot.x;
@ -873,8 +866,6 @@ EngMovePointer(
prcl->right = prcl->left + ppdev->PointerAttributes.Width;
prcl->bottom = prcl->top + ppdev->PointerAttributes.Height;
}
SurfGDI->PointerStatus = SPS_ACCEPT_EXCLUDE;
}
/* EOF */

View file

@ -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: cursoricon.c,v 1.50 2004/02/27 10:08:21 weiden Exp $ */
/* $Id: cursoricon.c,v 1.51 2004/03/15 20:21:51 navaraf Exp $ */
#undef WIN32_LEAN_AND_MEAN
@ -146,7 +146,8 @@ IntSetCursor(PWINSTATION_OBJECT WinStaObject, PCURICON_OBJECT NewCursor,
{
/* Remove the cursor if it was displayed */
IntLockGDIDriver(SurfGDI);
SurfGDI->MovePointer(SurfObj, -1, -1, &PointerRect);
if (SurfGDI->MovePointer != NULL)
SurfGDI->MovePointer(SurfObj, -1, -1, &PointerRect);
IntUnLockGDIDriver(SurfGDI);
SetPointerRect(CurInfo, &PointerRect);
}
@ -219,15 +220,22 @@ IntSetCursor(PWINSTATION_OBJECT WinStaObject, PCURICON_OBJECT NewCursor,
CurInfo->CurrentCursorObject = NULL;
}
IntLockGDIDriver(SurfGDI);
SurfGDI->PointerStatus = SurfGDI->SetPointerShape(SurfObj, soMask, soColor, XlateObj,
NewCursor->IconInfo.xHotspot,
NewCursor->IconInfo.yHotspot,
CurInfo->x,
CurInfo->y,
&PointerRect,
SPS_CHANGE);
IntUnLockGDIDriver(SurfGDI);
if (SurfGDI->SetPointerShape != NULL)
{
IntLockGDIDriver(SurfGDI);
SurfGDI->PointerStatus = SurfGDI->SetPointerShape(SurfObj, soMask, soColor, XlateObj,
NewCursor->IconInfo.xHotspot,
NewCursor->IconInfo.yHotspot,
CurInfo->x,
CurInfo->y,
&PointerRect,
SPS_CHANGE);
IntUnLockGDIDriver(SurfGDI);
}
else
{
SurfGDI->PointerStatus = SPS_DECLINE;
}
if(SurfGDI->PointerStatus == SPS_DECLINE)
{