- Changed the check for determining if the drawing destination is the screen or not.

- Fixed the order of calls to MouseSafetyOnDrawEnd in some functions.

svn path=/trunk/; revision=8545
This commit is contained in:
Hartmut Birr
2004-03-05 09:02:42 +00:00
parent a57c52276e
commit 35cd217de4
4 changed files with 31 additions and 20 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: copybits.c,v 1.21 2004/02/24 13:27:02 weiden Exp $
/* $Id: copybits.c,v 1.22 2004/03/05 09:02:41 hbirr Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -48,7 +48,8 @@ EngCopyBits(SURFOBJ *Dest,
POINTL *SourcePoint)
{
BOOLEAN ret;
SURFGDI *DestGDI, *SourceGDI;
PSURFGDI DestGDI = (PSURFGDI)AccessInternalObjectFromUserObject(Dest),
SourceGDI = (PSURFGDI)AccessInternalObjectFromUserObject(Source);
BYTE clippingType;
RECTL rclTmp;
POINTL ptlTmp;
@@ -79,8 +80,8 @@ EngCopyBits(SURFOBJ *Dest,
ret = DestGDI->CopyBits(Dest, Source, Clip, ColorTranslation, DestRect, SourcePoint);
IntUnLockGDIDriver(DestGDI);
MouseSafetyOnDrawEnd(Source, SourceGDI);
MouseSafetyOnDrawEnd(Dest, DestGDI);
MouseSafetyOnDrawEnd(Source, SourceGDI);
return ret;
}
@@ -97,8 +98,8 @@ EngCopyBits(SURFOBJ *Dest,
ret = SourceGDI->CopyBits(Dest, Source, Clip, ColorTranslation, DestRect, SourcePoint);
IntUnLockGDIDriver(DestGDI);
MouseSafetyOnDrawEnd(Source, SourceGDI);
MouseSafetyOnDrawEnd(Dest, DestGDI);
MouseSafetyOnDrawEnd(Source, SourceGDI);
return ret;
}
@@ -109,8 +110,8 @@ EngCopyBits(SURFOBJ *Dest,
NULL, Clip, ColorTranslation, DestRect, SourcePoint,
NULL, NULL, NULL, 0);
MouseSafetyOnDrawEnd(Source, SourceGDI);
MouseSafetyOnDrawEnd(Dest, DestGDI);
MouseSafetyOnDrawEnd(Source, SourceGDI);
return ret;
}
@@ -131,8 +132,8 @@ EngCopyBits(SURFOBJ *Dest,
case DC_TRIVIAL:
DestGDI->DIB_BitBlt(Dest, Source, DestGDI, SourceGDI, DestRect, SourcePoint, NULL, NULL, ColorTranslation, SRCCOPY);
MouseSafetyOnDrawEnd(Source, SourceGDI);
MouseSafetyOnDrawEnd(Dest, DestGDI);
MouseSafetyOnDrawEnd(Source, SourceGDI);
return(TRUE);
@@ -145,8 +146,8 @@ EngCopyBits(SURFOBJ *Dest,
DestGDI->DIB_BitBlt(Dest, Source, DestGDI, SourceGDI, &rclTmp, &ptlTmp, NULL, NULL, ColorTranslation, SRCCOPY);
MouseSafetyOnDrawEnd(Source, SourceGDI);
MouseSafetyOnDrawEnd(Dest, DestGDI);
MouseSafetyOnDrawEnd(Source, SourceGDI);
return(TRUE);
@@ -178,15 +179,14 @@ EngCopyBits(SURFOBJ *Dest,
} while(EnumMore);
MouseSafetyOnDrawEnd(Source, SourceGDI);
MouseSafetyOnDrawEnd(Dest, DestGDI);
MouseSafetyOnDrawEnd(Source, SourceGDI);
return(TRUE);
}
MouseSafetyOnDrawEnd(Source, SourceGDI);
MouseSafetyOnDrawEnd(Dest, DestGDI);
MouseSafetyOnDrawEnd(Source, SourceGDI);
return FALSE;
}

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.62 2004/02/24 13:27:02 weiden Exp $
/* $Id: mouse.c,v 1.63 2004/03/05 09:02:41 hbirr Exp $
*
* PROJECT: ReactOS kernel
* PURPOSE: Mouse
@@ -53,6 +53,10 @@
/* FUNCTIONS *****************************************************************/
BOOL FASTCALL
IntIsPrimarSurface(PSURFGDI SurfGDI);
BOOL FASTCALL
IntCheckClipCursor(LONG *x, LONG *y, PSYSTEM_CURSORINFO CurInfo)
{
@@ -109,9 +113,7 @@ MouseSafetyOnDrawStart(PSURFOBJ SurfObj, PSURFGDI SurfGDI, LONG HazardX1,
ObDereferenceObject(InputWindowStation);
return(FALSE);
}
if (SurfObj->iType != STYPE_DEVICE || MouseEnabled == FALSE)
if (!IntIsPrimarSurface(SurfGDI) || MouseEnabled == FALSE)
{
ObDereferenceObject(InputWindowStation);
return(FALSE);
@@ -199,8 +201,7 @@ MouseSafetyOnDrawEnd(PSURFOBJ SurfObj, PSURFGDI SurfGDI)
}
MouseEnabled = CurInfo->Enabled && CurInfo->ShowingCursor;
if (SurfObj->iType != STYPE_DEVICE || MouseEnabled == FALSE)
if (!IntIsPrimarSurface(SurfGDI) || MouseEnabled == FALSE)
{
ExReleaseFastMutex(&CurInfo->CursorMutex);
ObDereferenceObject(InputWindowStation);

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: transblt.c,v 1.11 2004/02/24 13:27:02 weiden Exp $
/* $Id: transblt.c,v 1.12 2004/03/05 09:02:42 hbirr Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -102,8 +102,8 @@ EngTransparentBlt(PSURFOBJ Dest,
TransparentColor, Reserved);
IntUnLockGDIDriver(DestGDI);
MouseSafetyOnDrawEnd(Source, SourceGDI);
MouseSafetyOnDrawEnd(Dest, DestGDI);
MouseSafetyOnDrawEnd(Source, SourceGDI);
if(EngDeleteSurface(hTemp) == FALSE)
{
@@ -116,8 +116,8 @@ EngTransparentBlt(PSURFOBJ Dest,
// Simulate a transparent blt
MouseSafetyOnDrawEnd(Source, SourceGDI);
MouseSafetyOnDrawEnd(Dest, DestGDI);
MouseSafetyOnDrawEnd(Source, SourceGDI);
return TRUE;
}

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: dc.c,v 1.121 2004/02/19 21:12:10 weiden Exp $
/* $Id: dc.c,v 1.122 2004/03/05 09:02:42 hbirr Exp $
*
* DC.C - Device context functions
*
@@ -2072,4 +2072,14 @@ DC_SetOwnership(HDC hDC, PEPROCESS Owner)
}
}
BOOL FASTCALL
IntIsPrimarSurface(PSURFGDI SurfGDI)
{
if (PrimarySurface.Handle == NULL)
{
return FALSE;
}
return SurfGDI == (PSURFGDI)AccessInternalObject((ULONG) PrimarySurface.Handle) ? TRUE : FALSE;
}
/* EOF */