mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
- 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.
svn path=/trunk/; revision=38342
This commit is contained in:
parent
e4fdb61e4c
commit
d120bf4591
5 changed files with 20 additions and 39 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue