Commit a patch for hide and show mouse. (forget it)

svn path=/trunk/; revision=20550
This commit is contained in:
Magnus Olsen 2006-01-03 18:49:10 +00:00
parent 8b60a45ea6
commit 7ceb46269d

View file

@ -157,6 +157,18 @@ IntHideMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface)
pgp->Enabled = FALSE;
/*
* The mouse is hide from ShowCours and it is frist ??
*/
if (pgp->ShowPointer < 0)
{
return ;
}
/*
* Hide the cours
*/
pt.x = pgp->Pos.x - pgp->HotSpot.x;
pt.y = pgp->Pos.y - pgp->HotSpot.y;
@ -213,6 +225,14 @@ IntShowMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface)
pgp->Enabled = TRUE;
/*
* Do not blt the mouse if it in hide
*/
if (pgp->ShowPointer < 0)
{
return ;
}
pt.x = pgp->Pos.x - pgp->HotSpot.x;
pt.y = pgp->Pos.y - pgp->HotSpot.y;
@ -244,6 +264,7 @@ IntShowMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface)
EngUnlockSurface(SaveSurface);
}
/*
* Blit the cursor on the screen.
*/
@ -266,6 +287,7 @@ IntShowMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface)
SrcPoint.x = max(-pt.x, 0);
SrcPoint.y = max(-pt.y, 0);
if (pgp->MaskSurface)
MaskSurf = EngLockSurface(pgp->MaskSurface);
@ -274,8 +296,6 @@ IntShowMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface)
if (pgp->ColorSurface != NULL)
{
if((ColorSurf = EngLockSurface(pgp->ColorSurface)))
{
if (pgp->ShowPointer >= 0)
{
IntEngBitBltEx(DestSurface, ColorSurf, MaskSurf, NULL,
pgp->XlateObject, &DestRect, &SrcPoint, &SrcPoint,
@ -283,10 +303,7 @@ IntShowMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface)
EngUnlockSurface(ColorSurf);
}
}
}
else
{
if (pgp->ShowPointer >= 0)
{
IntEngBitBltEx(DestSurface, MaskSurf, NULL, NULL, pgp->XlateObject,
&DestRect, &SrcPoint, NULL, NULL, NULL,
@ -296,7 +313,6 @@ IntShowMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface)
&DestRect, &SrcPoint, NULL, NULL, NULL,
ROP3_TO_ROP4(SRCINVERT), FALSE);
}
}
EngUnlockSurface(MaskSurf);
}
}