ShowCursor, gott a internal count to show the mouse or not, and return that value...
authorMagnus Olsen <magnus@greatlord.com>
Sun, 1 Jan 2006 01:09:08 +0000 (01:09 +0000)
committerMagnus Olsen <magnus@greatlord.com>
Sun, 1 Jan 2006 01:09:08 +0000 (01:09 +0000)
svn path=/trunk/; revision=20498

reactos/subsys/win32k/eng/mouse.c
reactos/subsys/win32k/include/dc.h
reactos/subsys/win32k/ntuser/misc.c
reactos/subsys/win32k/ntuser/stubs.c

index 3bc769c..05ffb98 100644 (file)
@@ -211,7 +211,7 @@ IntShowMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface)
       return;
    }
    
       return;
    }
    
-   if (pgp->ShowPointer == 1)
+   if (pgp->ShowPointer < 0)
    {
       return ;
    }
    {
       return ;
    }
index 53c8286..ae7f8b0 100644 (file)
@@ -134,7 +134,7 @@ typedef struct _GDIPOINTER /* should stay private to ENG */
   HSURF ColorSurface;\r
   HSURF MaskSurface;\r
   HSURF SaveSurface;\r
   HSURF ColorSurface;\r
   HSURF MaskSurface;\r
   HSURF SaveSurface;\r
-  BOOL  ShowPointer;\r
+  int  ShowPointer; /* counter negtive  do not show the mouse postive show the mouse */\r
   \r
   /* public pointer information */\r
   RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */\r
   \r
   /* public pointer information */\r
   RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */\r
index 4f3d40b..d61e081 100644 (file)
@@ -191,17 +191,18 @@ NtUserCallOneParam(
       BITMAPOBJ *BitmapObj;
       GDIDEVICE *ppdev;
       GDIPOINTER *pgp;
       BITMAPOBJ *BitmapObj;
       GDIDEVICE *ppdev;
       GDIPOINTER *pgp;
+      int showpointer=0;
                                                                                 
       if(!(Screen = IntGetScreenDC()))
       {
                                                                                 
       if(!(Screen = IntGetScreenDC()))
       {
-        return 1; /* No mouse */
+        return showpointer; /* No mouse */
       }
                        
       PDC dc = DC_LockDc(Screen);
 
       if (!dc)
       {
       }
                        
       PDC dc = DC_LockDc(Screen);
 
       if (!dc)
       {
-        return 1; /* No mouse */
+        return showpointer; /* No mouse */
       }
            
       dcbmp = dc->w.hBitmap;
       }
            
       dcbmp = dc->w.hBitmap;
@@ -211,14 +212,14 @@ NtUserCallOneParam(
       if ( !BitmapObj )
       {
          BITMAPOBJ_UnlockBitmap(BitmapObj); 
       if ( !BitmapObj )
       {
          BITMAPOBJ_UnlockBitmap(BitmapObj); 
-         return 1; /* No Mouse */
+         return showpointer; /* No Mouse */
       }
               
       SurfObj = &BitmapObj->SurfObj;
       if (SurfObj == NULL)
       {
         BITMAPOBJ_UnlockBitmap(BitmapObj); 
       }
               
       SurfObj = &BitmapObj->SurfObj;
       if (SurfObj == NULL)
       {
         BITMAPOBJ_UnlockBitmap(BitmapObj); 
-        return 1; /* No mouse */
+        return showpointer; /* No mouse */
       }
            
       ppdev = GDIDEV(SurfObj);
       }
            
       ppdev = GDIDEV(SurfObj);
@@ -226,7 +227,7 @@ NtUserCallOneParam(
       if(ppdev == NULL)
       {
         BITMAPOBJ_UnlockBitmap(BitmapObj); 
       if(ppdev == NULL)
       {
         BITMAPOBJ_UnlockBitmap(BitmapObj); 
-        return 1; /* No mouse */
+        return showpointer; /* No mouse */
       }
                   
       pgp = &ppdev->Pointer;
       }
                   
       pgp = &ppdev->Pointer;
@@ -235,9 +236,11 @@ NtUserCallOneParam(
            
       if (Param == FALSE)
       {
            
       if (Param == FALSE)
       {
-          if (CurInfo->ShowingCursor != 0)
-          {
-             pgp->ShowPointer = 1;
+          pgp->ShowPointer--;         
+          showpointer = pgp->ShowPointer;
+          
+          if (showpointer >= 0)
+          {          
              //ppdev->SafetyRemoveCount = 1;
              //ppdev->SafetyRemoveLevel = 1;
              EngMovePointer(SurfObj,-1,-1,NULL);               
              //ppdev->SafetyRemoveCount = 1;
              //ppdev->SafetyRemoveLevel = 1;
              EngMovePointer(SurfObj,-1,-1,NULL);               
@@ -247,16 +250,21 @@ NtUserCallOneParam(
        }
        else
        {
        }
        else
        {
+          pgp->ShowPointer++;
+          showpointer = pgp->ShowPointer;
+          
           /* Show Cursor */              
           /* Show Cursor */              
-          pgp->ShowPointer = 0;
-          //ppdev->SafetyRemoveCount = 0;
-          //ppdev->SafetyRemoveLevel = 0;
-          EngMovePointer(SurfObj,-1,-1,NULL);
-          CurInfo->ShowingCursor = CURSOR_SHOWING;
+          if (showpointer < 0) 
+          {
+             //ppdev->SafetyRemoveCount = 0;
+             //ppdev->SafetyRemoveLevel = 0;
+             EngMovePointer(SurfObj,-1,-1,NULL);
+             CurInfo->ShowingCursor = CURSOR_SHOWING;
+          }
        }
                                                     
        BITMAPOBJ_UnlockBitmap(BitmapObj); 
        }
                                                     
        BITMAPOBJ_UnlockBitmap(BitmapObj); 
-       return 0;                       
+       return showpointer;                       
        }
          
    
        }
          
    
index 41f33a8..a3b2075 100644 (file)
@@ -365,6 +365,35 @@ NtUserGetMouseMovePointsEx(
    int nBufPoints,
    DWORD resolution)
 {
    int nBufPoints,
    DWORD resolution)
 {
+/*
+   if (cbSize != sizeof (MOUSEMOVEPOINT)
+   {
+       SetLastWin32Error(GMMP_ERR_POINT_NOT_FOUND);
+       return GMMP_ERR_POINT_NOT_FOUND;
+   }
+       
+   if (!lppt)
+   {
+       SetLastWin32Error(GMMP_ERR_POINT_NOT_FOUND);
+       return GMMP_ERR_POINT_NOT_FOUND;
+   }
+   
+   if (!lpptBuf)
+   {
+       SetLastWin32Error(GMMP_ERR_POINT_NOT_FOUND);
+       return GMMP_ERR_POINT_NOT_FOUND;
+   }
+       
+   switch(resolution)
+   {
+     case GMMP_USE_DISPLAY_POINTS:
+     case GMMP_USE_HIGH_RESOLUTION_POINTS:
+          break;
+     default:
+        SetLastWin32Error(GMMP_ERR_POINT_NOT_FOUND);
+        return GMMP_ERR_POINT_NOT_FOUND;
+   }
+  */     
    UNIMPLEMENTED
 
    return 0;
    UNIMPLEMENTED
 
    return 0;