Author: jimtabor Date: Wed Dec 24 18:35:02 2008 New Revision: 38342
URL: http://svn.reactos.org/svn/reactos?rev=38342&view=rev Log: - Use Cursor position from server information. I guess the logic is, one workstation per system with multiple desktops. So we would always have one cursor pointer, not one per desktop.
Modified: trunk/reactos/subsystems/win32/win32k/eng/mouse.c trunk/reactos/subsystems/win32/win32k/include/dc.h trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c trunk/reactos/subsystems/win32/win32k/ntuser/input.c trunk/reactos/subsystems/win32/win32k/objects/dc.c
Modified: trunk/reactos/subsystems/win32/win32k/eng/mouse.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/eng... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/mouse.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/mouse.c [iso-8859-1] Wed Dec 24 18:35:02 2008 @@ -126,9 +126,9 @@ 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 @@ /* * 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 @@ 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 @@ * 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 @@ { /* 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) {
Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] Wed Dec 24 18:35:02 2008 @@ -157,7 +157,6 @@ { /* private GDI pointer handling information, required for software emulation */ BOOL Enabled; - POINTL Pos; SIZEL Size; POINTL HotSpot; XLATEOBJ *XlateObject;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c [iso-8859-1] Wed Dec 24 18:35:02 2008 @@ -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 @@ 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 @@ 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;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/input.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/input.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/input.c [iso-8859-1] Wed Dec 24 18:35:02 2008 @@ -1094,8 +1094,8 @@ } /* 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); }
Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] Wed Dec 24 18:35:02 2008 @@ -685,8 +685,8 @@ 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);