diff --git a/reactos/subsys/win32k/eng/mouse.c b/reactos/subsys/win32k/eng/mouse.c index 3bc769cd315..05ffb9831ed 100644 --- a/reactos/subsys/win32k/eng/mouse.c +++ b/reactos/subsys/win32k/eng/mouse.c @@ -211,7 +211,7 @@ IntShowMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface) return; } - if (pgp->ShowPointer == 1) + if (pgp->ShowPointer < 0) { return ; } diff --git a/reactos/subsys/win32k/include/dc.h b/reactos/subsys/win32k/include/dc.h index 53c8286993a..ae7f8b00bda 100644 --- a/reactos/subsys/win32k/include/dc.h +++ b/reactos/subsys/win32k/include/dc.h @@ -134,7 +134,7 @@ typedef struct _GDIPOINTER /* should stay private to ENG */ 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 */ diff --git a/reactos/subsys/win32k/ntuser/misc.c b/reactos/subsys/win32k/ntuser/misc.c index 4f3d40b914a..d61e0816a2d 100644 --- a/reactos/subsys/win32k/ntuser/misc.c +++ b/reactos/subsys/win32k/ntuser/misc.c @@ -191,17 +191,18 @@ NtUserCallOneParam( 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 @@ NtUserCallOneParam( 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 @@ NtUserCallOneParam( if(ppdev == NULL) { BITMAPOBJ_UnlockBitmap(BitmapObj); - return 1; /* No mouse */ + return showpointer; /* No mouse */ } pgp = &ppdev->Pointer; @@ -235,9 +236,11 @@ NtUserCallOneParam( 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 @@ NtUserCallOneParam( } 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; } diff --git a/reactos/subsys/win32k/ntuser/stubs.c b/reactos/subsys/win32k/ntuser/stubs.c index 41f33a8f609..a3b20759a1a 100644 --- a/reactos/subsys/win32k/ntuser/stubs.c +++ b/reactos/subsys/win32k/ntuser/stubs.c @@ -365,6 +365,35 @@ NtUserGetMouseMovePointsEx( 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;