Author: jgardou
Date: Mon Apr 19 16:17:26 2010
New Revision: 46939
URL:
http://svn.reactos.org/svn/reactos?rev=46939&view=rev
Log:
[WIN32K]
- move mouse related ppdev locking to Gre* functions
Spotted by Physicus
Modified:
branches/reactos-yarotows/subsystems/win32/win32k/eng/mouse.c
Modified: branches/reactos-yarotows/subsystems/win32/win32k/eng/mouse.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
==============================================================================
--- branches/reactos-yarotows/subsystems/win32/win32k/eng/mouse.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/subsystems/win32/win32k/eng/mouse.c [iso-8859-1] Mon Apr 19
16:17:26 2010
@@ -531,9 +531,7 @@
if(ppdev->SafetyRemoveLevel)
return ;
- EngAcquireSemaphore(ppdev->hsemDevLock);
ppdev->pfnMovePointer(pso, x, y, prcl);
- EngReleaseSemaphore(ppdev->hsemDevLock);
}
ULONG APIENTRY
@@ -555,7 +553,6 @@
pfnSetPointerShape = GDIDEVFUNCS(pso).SetPointerShape;
- EngAcquireSemaphore(ppdev->hsemDevLock);
if (pfnSetPointerShape)
{
ulResult = pfnSetPointerShape(pso,
@@ -593,8 +590,6 @@
ppdev->pfnMovePointer = EngMovePointer;
}
- EngReleaseSemaphore(ppdev->hsemDevLock);
-
return ulResult;
}
@@ -623,11 +618,13 @@
}
ASSERT(pdc->dctype == DCTYPE_DIRECT);
+ EngAcquireSemaphore(pdc->ppdev->hsemDevLock);
/* We're not sure DC surface is the good one */
psurf = pdc->ppdev->pSurface;
if (!psurf)
{
DPRINT1("DC has no surface.\n");
+ EngReleaseSemaphore(pdc->ppdev->hsemDevLock);
DC_UnlockDc(pdc);
return 0;
}
@@ -675,6 +672,8 @@
if (psurfMask)
SURFACE_ShareUnlockSurface(psurfMask);
+ EngReleaseSemaphore(pdc->ppdev->hsemDevLock);
+
/* Unlock the DC */
DC_UnlockDc(pdc);
@@ -701,12 +700,14 @@
}
ASSERT(pdc->dctype == DCTYPE_DIRECT);
+ EngAcquireSemaphore(pdc->ppdev->hsemDevLock);
/* Store the cursor exclude position in the PDEV */
prcl = &pdc->ppdev->Pointer.Exclude;
/* Call Eng/Drv function */
IntEngMovePointer(&pdc->ppdev->pSurface->SurfObj, x, y, prcl);
+ EngReleaseSemaphore(pdc->ppdev->hsemDevLock);
/* Unlock the DC */
DC_UnlockDc(pdc);
}