ShowCursor, gott a internal count to show the mouse or not, and return
that value. as msdn descripe.
Modified: trunk/reactos/subsys/win32k/eng/mouse.c
Modified: trunk/reactos/subsys/win32k/include/dc.h
Modified: trunk/reactos/subsys/win32k/ntuser/misc.c
Modified: trunk/reactos/subsys/win32k/ntuser/stubs.c
_____
Modified: trunk/reactos/subsys/win32k/eng/mouse.c
--- trunk/reactos/subsys/win32k/eng/mouse.c 2005-12-31 23:04:53 UTC
(rev 20497)
+++ trunk/reactos/subsys/win32k/eng/mouse.c 2006-01-01 01:09:08 UTC
(rev 20498)
@@ -211,7 +211,7 @@
return;
}
- if (pgp->ShowPointer == 1)
+ if (pgp->ShowPointer < 0)
{
return ;
}
_____
Modified: trunk/reactos/subsys/win32k/include/dc.h
--- trunk/reactos/subsys/win32k/include/dc.h 2005-12-31 23:04:53 UTC
(rev 20497)
+++ trunk/reactos/subsys/win32k/include/dc.h 2006-01-01 01:09:08 UTC
(rev 20498)
@@ -134,7 +134,7 @@
HSURF ColorSurface;
HSURF MaskSurface;
HSURF SaveSurface;
- BOOL ShowPointer;
+ int ShowPointer; /* counter negtive do not show the mouse postive
show the mouse */
/* public pointer information */
RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */
_____
Modified: trunk/reactos/subsys/win32k/ntuser/misc.c
--- trunk/reactos/subsys/win32k/ntuser/misc.c 2005-12-31 23:04:53 UTC
(rev 20497)
+++ trunk/reactos/subsys/win32k/ntuser/misc.c 2006-01-01 01:09:08 UTC
(rev 20498)
@@ -191,17 +191,18 @@
BITMAPOBJ *BitmapObj;
GDIDEVICE *ppdev;
GDIPOINTER *pgp;
+ int showpointer=0;
if(!(Screen = IntGetScreenDC()))
{
- return 1; /* No mouse */
+ return showpointer; /* No mouse */
}
PDC dc = DC_LockDc(Screen);
if (!dc)
{
- return 1; /* No mouse */
+ return showpointer; /* No mouse */
}
dcbmp = dc->w.hBitmap;
@@ -211,14 +212,14 @@
if ( !BitmapObj )
{
BITMAPOBJ_UnlockBitmap(BitmapObj);
- return 1; /* No Mouse */
+ return showpointer; /* No Mouse */
}
SurfObj = &BitmapObj->SurfObj;
if (SurfObj == NULL)
{
BITMAPOBJ_UnlockBitmap(BitmapObj);
- return 1; /* No mouse */
+ return showpointer; /* No mouse */
}
ppdev = GDIDEV(SurfObj);
@@ -226,7 +227,7 @@
if(ppdev == NULL)
{
BITMAPOBJ_UnlockBitmap(BitmapObj);
- return 1; /* No mouse */
+ return showpointer; /* No mouse */
}
pgp = &ppdev->Pointer;
@@ -235,9 +236,11 @@
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);
@@ -247,16 +250,21 @@
}
else
{
+ pgp->ShowPointer++;
+ showpointer = pgp->ShowPointer;
+
/* 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);
- return 0;
+ return showpointer;
}
_____
Modified: trunk/reactos/subsys/win32k/ntuser/stubs.c
--- trunk/reactos/subsys/win32k/ntuser/stubs.c 2005-12-31 23:04:53 UTC
(rev 20497)
+++ trunk/reactos/subsys/win32k/ntuser/stubs.c 2006-01-01 01:09:08 UTC
(rev 20498)
@@ -365,6 +365,35 @@
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;
Show replies by date