[ros-diffs] [khornicek] 44126: - pass a pointer to the exclude rect to GreMovePointer - store the cursor coordinates in pdevobj - retrieve the cursor position form global CursorInfo in MouseSafetyOnDrawEnd - MouseSafetyOnDrawStart/End should work now

khornicek at svn.reactos.org khornicek at svn.reactos.org
Fri Nov 13 11:07:18 CET 2009


Author: khornicek
Date: Fri Nov 13 11:07:18 2009
New Revision: 44126

URL: http://svn.reactos.org/svn/reactos?rev=44126&view=rev
Log:
- pass a pointer to the exclude rect to GreMovePointer
- store the cursor coordinates in pdevobj
- retrieve the cursor position form global CursorInfo in MouseSafetyOnDrawEnd
- MouseSafetyOnDrawStart/End should work now


Modified:
    branches/arwinss/reactos/subsystems/win32/win32k/eng/engpoint.c
    branches/arwinss/reactos/subsystems/win32/win32k/gre/cursoricon.c
    branches/arwinss/reactos/subsystems/win32/win32k/include/cursor.h
    branches/arwinss/reactos/subsystems/win32/win32k/include/devobj.h
    branches/arwinss/reactos/subsystems/win32/win32k/main/cursor.c

Modified: branches/arwinss/reactos/subsystems/win32/win32k/eng/engpoint.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32/win32k/eng/engpoint.c?rev=44126&r1=44125&r2=44126&view=diff
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/eng/engpoint.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/eng/engpoint.c [iso-8859-1] Fri Nov 13 11:07:18 2009
@@ -16,8 +16,6 @@
 
 /* PUBLIC FUNCTIONS **********************************************************/
 
-POINTL        ptlPointer;
-
 VOID
 IntHideMousePointer(
     PDEVOBJ *ppdev,
@@ -46,8 +44,8 @@
     }
 
     /* Calculate cursor coordinates */
-    pt.x = ptlPointer.x - pgp->HotSpot.x;
-    pt.y = ptlPointer.y - pgp->HotSpot.y;
+    pt.x = ppdev->ptlPointer.x - pgp->HotSpot.x;
+    pt.y = ppdev->ptlPointer.y - pgp->HotSpot.y;
 
     rclDest.left = max(pt.x, 0);
     rclDest.top = max(pt.y, 0);
@@ -91,8 +89,8 @@
     pgp->Enabled = TRUE;
 
     /* Calculate pointer coordinates */
-    pt.x = ptlPointer.x - pgp->HotSpot.x;
-    pt.y = ptlPointer.y - pgp->HotSpot.y;
+    pt.x = ppdev->ptlPointer.x - pgp->HotSpot.x;
+    pt.y = ppdev->ptlPointer.y - pgp->HotSpot.y;
 
     /* Calculate the rect on the surface */
     rclSurf.left = max(pt.x, 0);
@@ -259,7 +257,7 @@
     if (--ppdev->SafetyRemoveCount >= ppdev->SafetyRemoveLevel)
         return FALSE;
 
-    ppdev->pfnMovePointer(pso, ptlPointer.x, ptlPointer.y, &pgp->Exclude);
+    ppdev->pfnMovePointer(pso, CursorInfo.CursorPos.x, CursorInfo.CursorPos.y, &pgp->Exclude);
 
     ppdev->SafetyRemoveLevel = 0;
 
@@ -441,8 +439,8 @@
 
     if (x != -1)
     {
-        ptlPointer.x = x;
-        ptlPointer.y = y;
+        ppdev->ptlPointer.x = x;
+        ppdev->ptlPointer.y = y;
 
         IntShowMousePointer(ppdev, pso);
 
@@ -485,8 +483,8 @@
 
     IntHideMousePointer(ppdev, pso);
 
-    ptlPointer.x = x;
-    ptlPointer.y = y;
+    ppdev->ptlPointer.x = x;
+    ppdev->ptlPointer.y = y;
 
     if (x != -1)
     {

Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/cursoricon.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32/win32k/gre/cursoricon.c?rev=44126&r1=44125&r2=44126&view=diff
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/gre/cursoricon.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/gre/cursoricon.c [iso-8859-1] Fri Nov 13 11:07:18 2009
@@ -152,7 +152,7 @@
                                 NewCursor->yHotspot,
                                 CursorInfo->CursorPos.x,
                                 CursorInfo->CursorPos.y,
-                                NULL,
+                                &(GDIDEV(pso)->Pointer.Exclude),
                                 SPS_CHANGE);
 
    if (Status != SPS_ACCEPT_NOEXCLUDE)

Modified: branches/arwinss/reactos/subsystems/win32/win32k/include/cursor.h
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32/win32k/include/cursor.h?rev=44126&r1=44125&r2=44126&view=diff
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/include/cursor.h [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/include/cursor.h [iso-8859-1] Fri Nov 13 11:07:18 2009
@@ -20,3 +20,5 @@
   SURFACE  *psurfSave;
   RECTL    Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */
 } GDIPOINTER, *PGDIPOINTER;
+
+extern SYSTEM_CURSORINFO CursorInfo;

Modified: branches/arwinss/reactos/subsystems/win32/win32k/include/devobj.h
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32/win32k/include/devobj.h?rev=44126&r1=44125&r2=44126&view=diff
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/include/devobj.h [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/include/devobj.h [iso-8859-1] Fri Nov 13 11:07:18 2009
@@ -5,6 +5,7 @@
 {
     DEVINFO                   DevInfo;
     GDIINFO                   GDIInfo;
+    POINTL                    ptlPointer;
     PFN_DrvMovePointer        pfnMovePointer;
     DHPDEV                    hPDev;
     PVOID                     pdmwDev;

Modified: branches/arwinss/reactos/subsystems/win32/win32k/main/cursor.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32/win32k/main/cursor.c?rev=44126&r1=44125&r2=44126&view=diff
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/main/cursor.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/main/cursor.c [iso-8859-1] Fri Nov 13 11:07:18 2009
@@ -10,7 +10,7 @@
 #define NDEBUG
 #include <debug.h>
 
-static SYSTEM_CURSORINFO CursorInfo;
+SYSTEM_CURSORINFO CursorInfo;
 
 extern PDEVOBJ PrimarySurface;
 
@@ -60,7 +60,7 @@
     if (CursorInfo.ShowingCursor)
     {
         pso = EngLockSurface(PrimarySurface.pSurface);
-        GreMovePointer(pso, pos.x, pos.y, NULL);
+        GreMovePointer(pso, pos.x, pos.y, &(GDIDEV(pso)->Pointer.Exclude));
         EngUnlockSurface(pso);
     }
 




More information about the Ros-diffs mailing list