diff --git a/reactos/subsystems/win32/win32k/eng/mouse.c b/reactos/subsystems/win32/win32k/eng/mouse.c index 3ab55e0f447..e59489b6ab6 100644 --- a/reactos/subsystems/win32/win32k/eng/mouse.c +++ b/reactos/subsystems/win32/win32k/eng/mouse.c @@ -126,9 +126,9 @@ MouseSafetyOnDrawEnd(SURFOBJ *SurfObj) return FALSE; } if (pgp->MovePointer) - pgp->MovePointer(SurfObj, pgp->Pos.x, pgp->Pos.y, &pgp->Exclude); + pgp->MovePointer(SurfObj, gpsi->ptCursor.x, gpsi->ptCursor.y, &pgp->Exclude); else - EngMovePointer(SurfObj, pgp->Pos.x, pgp->Pos.y, &pgp->Exclude); + EngMovePointer(SurfObj, gpsi->ptCursor.x, gpsi->ptCursor.y, &pgp->Exclude); ppdev->SafetyRemoveLevel = 0; @@ -169,8 +169,8 @@ IntHideMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface) /* * Hide the cours */ - pt.x = pgp->Pos.x - pgp->HotSpot.x; - pt.y = pgp->Pos.y - pgp->HotSpot.y; + pt.x = gpsi->ptCursor.x - pgp->HotSpot.x; + pt.y = gpsi->ptCursor.y - pgp->HotSpot.y; if (pgp->SaveSurface != NULL) @@ -233,8 +233,8 @@ IntShowMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface) return ; } - pt.x = pgp->Pos.x - pgp->HotSpot.x; - pt.y = pgp->Pos.y - pgp->HotSpot.y; + pt.x = gpsi->ptCursor.x - pgp->HotSpot.x; + pt.y = gpsi->ptCursor.y - pgp->HotSpot.y; /* * Copy the pixels under the cursor to temporary surface. @@ -402,8 +402,8 @@ EngSetPointerShape( * done right after this. It helps IntShowMousePointer. */ if (x != -1) { - pgp->Pos.x = x; - pgp->Pos.y = y; + gpsi->ptCursor.x = x; + gpsi->ptCursor.y = y; } pgp->Size.cx = abs(psoMask->lDelta) << 3; @@ -552,8 +552,8 @@ EngMovePointer( { /* Actually this should be set by 'the other side', but it would be * done right after this. It helps IntShowMousePointer. */ - pgp->Pos.x = x; - pgp->Pos.y = y; + gpsi->ptCursor.x = x; + gpsi->ptCursor.y = y; IntShowMousePointer(ppdev, pso); if (prcl != NULL) { diff --git a/reactos/subsystems/win32/win32k/include/dc.h b/reactos/subsystems/win32/win32k/include/dc.h index 9e33cd570c4..cc0da092e1c 100644 --- a/reactos/subsystems/win32/win32k/include/dc.h +++ b/reactos/subsystems/win32/win32k/include/dc.h @@ -157,7 +157,6 @@ typedef struct _GDIPOINTER /* should stay private to ENG? No, part of GDIDEVICE { /* private GDI pointer handling information, required for software emulation */ BOOL Enabled; - POINTL Pos; SIZEL Size; POINTL HotSpot; XLATEOBJ *XlateObject; diff --git a/reactos/subsystems/win32/win32k/ntuser/cursoricon.c b/reactos/subsystems/win32/win32k/ntuser/cursoricon.c index b19ba200e32..70090cbd330 100644 --- a/reactos/subsystems/win32/win32k/ntuser/cursoricon.c +++ b/reactos/subsystems/win32/win32k/ntuser/cursoricon.c @@ -44,29 +44,11 @@ static PAGED_LOOKASIDE_LIST gProcessLookasideList; static LIST_ENTRY gCurIconList; -/* Look up the location of the cursor in the GDIDEVICE structure - * when all we know is the window station object - * Actually doesn't use the window station, but should... */ BOOL FASTCALL IntGetCursorLocation(PWINSTATION_OBJECT WinSta, POINT *loc) { - HDC hDC; - PDC dc; - GDIDEVICE *GDIDevice; - -#if 1 - /* FIXME - get the screen dc from the window station or desktop */ - if (!(hDC = IntGetScreenDC())) - return FALSE; -#endif - - if (!(dc = DC_LockDc(hDC))) - return FALSE; - GDIDevice = (GDIDEVICE *)dc->pPDev; - DC_UnlockDc(dc); - - loc->x = GDIDevice->Pointer.Pos.x; - loc->y = GDIDevice->Pointer.Pos.y; + loc->x = gpsi->ptCursor.x; + loc->y = gpsi->ptCursor.y; return TRUE; } @@ -259,8 +241,8 @@ IntSetCursor(PWINSTATION_OBJECT WinSta, PCURICON_OBJECT NewCursor, SurfObj, soMask, soColor, XlateObj, NewCursor->IconInfo.xHotspot, NewCursor->IconInfo.yHotspot, - GDIDEV(SurfObj)->Pointer.Pos.x, - GDIDEV(SurfObj)->Pointer.Pos.y, + gpsi->ptCursor.x, + gpsi->ptCursor.y, &(GDIDEV(SurfObj)->Pointer.Exclude), SPS_CHANGE); DPRINT("SetCursor: DrvSetPointerShape() returned %x\n", @@ -277,8 +259,8 @@ IntSetCursor(PWINSTATION_OBJECT WinSta, PCURICON_OBJECT NewCursor, SurfObj, soMask, soColor, XlateObj, NewCursor->IconInfo.xHotspot, NewCursor->IconInfo.yHotspot, - GDIDEV(SurfObj)->Pointer.Pos.x, - GDIDEV(SurfObj)->Pointer.Pos.y, + gpsi->ptCursor.x, + gpsi->ptCursor.y, &(GDIDEV(SurfObj)->Pointer.Exclude), SPS_CHANGE); GDIDEV(SurfObj)->Pointer.MovePointer = NULL; diff --git a/reactos/subsystems/win32/win32k/ntuser/input.c b/reactos/subsystems/win32/win32k/ntuser/input.c index 3dbb05db353..4ecc6c13088 100644 --- a/reactos/subsystems/win32/win32k/ntuser/input.c +++ b/reactos/subsystems/win32/win32k/ntuser/input.c @@ -1094,8 +1094,8 @@ IntMouseInput(MOUSEINPUT *mi) } /* Only now, update the info in the GDIDEVICE, so EngMovePointer can * use the old values to move the pointer image */ - GDIDEV(SurfObj)->Pointer.Pos.x = MousePos.x; - GDIDEV(SurfObj)->Pointer.Pos.y = MousePos.y; + gpsi->ptCursor.x = MousePos.x; + gpsi->ptCursor.y = MousePos.y; BITMAPOBJ_UnlockBitmap(BitmapObj); } diff --git a/reactos/subsystems/win32/win32k/objects/dc.c b/reactos/subsystems/win32/win32k/objects/dc.c index 8a0d64b2784..626d085d489 100644 --- a/reactos/subsystems/win32/win32k/objects/dc.c +++ b/reactos/subsystems/win32/win32k/objects/dc.c @@ -685,8 +685,8 @@ IntCreatePrimarySurface() EngEraseSurface(SurfObj, &SurfaceRect, 0); */ /* Put the pointer in the center of the screen */ - GDIDEV(SurfObj)->Pointer.Pos.x = (SurfaceRect.right - SurfaceRect.left) / 2; - GDIDEV(SurfObj)->Pointer.Pos.y = (SurfaceRect.bottom - SurfaceRect.top) / 2; + gpsi->ptCursor.x = (SurfaceRect.right - SurfaceRect.left) / 2; + gpsi->ptCursor.y = (SurfaceRect.bottom - SurfaceRect.top) / 2; EngUnlockSurface(SurfObj); co_IntShowDesktop(IntGetActiveDesktop(), SurfSize.cx, SurfSize.cy);