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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (pgp->MovePointer)
|
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
|
else
|
||||||
EngMovePointer(SurfObj, pgp->Pos.x, pgp->Pos.y, &pgp->Exclude);
|
EngMovePointer(SurfObj, gpsi->ptCursor.x, gpsi->ptCursor.y, &pgp->Exclude);
|
||||||
|
|
||||||
ppdev->SafetyRemoveLevel = 0;
|
ppdev->SafetyRemoveLevel = 0;
|
||||||
|
|
||||||
|
@ -169,8 +169,8 @@ IntHideMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface)
|
||||||
/*
|
/*
|
||||||
* Hide the cours
|
* Hide the cours
|
||||||
*/
|
*/
|
||||||
pt.x = pgp->Pos.x - pgp->HotSpot.x;
|
pt.x = gpsi->ptCursor.x - pgp->HotSpot.x;
|
||||||
pt.y = pgp->Pos.y - pgp->HotSpot.y;
|
pt.y = gpsi->ptCursor.y - pgp->HotSpot.y;
|
||||||
|
|
||||||
|
|
||||||
if (pgp->SaveSurface != NULL)
|
if (pgp->SaveSurface != NULL)
|
||||||
|
@ -233,8 +233,8 @@ IntShowMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface)
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
pt.x = pgp->Pos.x - pgp->HotSpot.x;
|
pt.x = gpsi->ptCursor.x - pgp->HotSpot.x;
|
||||||
pt.y = pgp->Pos.y - pgp->HotSpot.y;
|
pt.y = gpsi->ptCursor.y - pgp->HotSpot.y;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy the pixels under the cursor to temporary surface.
|
* Copy the pixels under the cursor to temporary surface.
|
||||||
|
@ -402,8 +402,8 @@ EngSetPointerShape(
|
||||||
* done right after this. It helps IntShowMousePointer. */
|
* done right after this. It helps IntShowMousePointer. */
|
||||||
if (x != -1)
|
if (x != -1)
|
||||||
{
|
{
|
||||||
pgp->Pos.x = x;
|
gpsi->ptCursor.x = x;
|
||||||
pgp->Pos.y = y;
|
gpsi->ptCursor.y = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
pgp->Size.cx = abs(psoMask->lDelta) << 3;
|
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
|
/* Actually this should be set by 'the other side', but it would be
|
||||||
* done right after this. It helps IntShowMousePointer. */
|
* done right after this. It helps IntShowMousePointer. */
|
||||||
pgp->Pos.x = x;
|
gpsi->ptCursor.x = x;
|
||||||
pgp->Pos.y = y;
|
gpsi->ptCursor.y = y;
|
||||||
IntShowMousePointer(ppdev, pso);
|
IntShowMousePointer(ppdev, pso);
|
||||||
if (prcl != NULL)
|
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 */
|
/* private GDI pointer handling information, required for software emulation */
|
||||||
BOOL Enabled;
|
BOOL Enabled;
|
||||||
POINTL Pos;
|
|
||||||
SIZEL Size;
|
SIZEL Size;
|
||||||
POINTL HotSpot;
|
POINTL HotSpot;
|
||||||
XLATEOBJ *XlateObject;
|
XLATEOBJ *XlateObject;
|
||||||
|
|
|
@ -44,29 +44,11 @@
|
||||||
static PAGED_LOOKASIDE_LIST gProcessLookasideList;
|
static PAGED_LOOKASIDE_LIST gProcessLookasideList;
|
||||||
static LIST_ENTRY gCurIconList;
|
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
|
BOOL FASTCALL
|
||||||
IntGetCursorLocation(PWINSTATION_OBJECT WinSta, POINT *loc)
|
IntGetCursorLocation(PWINSTATION_OBJECT WinSta, POINT *loc)
|
||||||
{
|
{
|
||||||
HDC hDC;
|
loc->x = gpsi->ptCursor.x;
|
||||||
PDC dc;
|
loc->y = gpsi->ptCursor.y;
|
||||||
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;
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -259,8 +241,8 @@ IntSetCursor(PWINSTATION_OBJECT WinSta, PCURICON_OBJECT NewCursor,
|
||||||
SurfObj, soMask, soColor, XlateObj,
|
SurfObj, soMask, soColor, XlateObj,
|
||||||
NewCursor->IconInfo.xHotspot,
|
NewCursor->IconInfo.xHotspot,
|
||||||
NewCursor->IconInfo.yHotspot,
|
NewCursor->IconInfo.yHotspot,
|
||||||
GDIDEV(SurfObj)->Pointer.Pos.x,
|
gpsi->ptCursor.x,
|
||||||
GDIDEV(SurfObj)->Pointer.Pos.y,
|
gpsi->ptCursor.y,
|
||||||
&(GDIDEV(SurfObj)->Pointer.Exclude),
|
&(GDIDEV(SurfObj)->Pointer.Exclude),
|
||||||
SPS_CHANGE);
|
SPS_CHANGE);
|
||||||
DPRINT("SetCursor: DrvSetPointerShape() returned %x\n",
|
DPRINT("SetCursor: DrvSetPointerShape() returned %x\n",
|
||||||
|
@ -277,8 +259,8 @@ IntSetCursor(PWINSTATION_OBJECT WinSta, PCURICON_OBJECT NewCursor,
|
||||||
SurfObj, soMask, soColor, XlateObj,
|
SurfObj, soMask, soColor, XlateObj,
|
||||||
NewCursor->IconInfo.xHotspot,
|
NewCursor->IconInfo.xHotspot,
|
||||||
NewCursor->IconInfo.yHotspot,
|
NewCursor->IconInfo.yHotspot,
|
||||||
GDIDEV(SurfObj)->Pointer.Pos.x,
|
gpsi->ptCursor.x,
|
||||||
GDIDEV(SurfObj)->Pointer.Pos.y,
|
gpsi->ptCursor.y,
|
||||||
&(GDIDEV(SurfObj)->Pointer.Exclude),
|
&(GDIDEV(SurfObj)->Pointer.Exclude),
|
||||||
SPS_CHANGE);
|
SPS_CHANGE);
|
||||||
GDIDEV(SurfObj)->Pointer.MovePointer = NULL;
|
GDIDEV(SurfObj)->Pointer.MovePointer = NULL;
|
||||||
|
|
|
@ -1094,8 +1094,8 @@ IntMouseInput(MOUSEINPUT *mi)
|
||||||
}
|
}
|
||||||
/* Only now, update the info in the GDIDEVICE, so EngMovePointer can
|
/* Only now, update the info in the GDIDEVICE, so EngMovePointer can
|
||||||
* use the old values to move the pointer image */
|
* use the old values to move the pointer image */
|
||||||
GDIDEV(SurfObj)->Pointer.Pos.x = MousePos.x;
|
gpsi->ptCursor.x = MousePos.x;
|
||||||
GDIDEV(SurfObj)->Pointer.Pos.y = MousePos.y;
|
gpsi->ptCursor.y = MousePos.y;
|
||||||
|
|
||||||
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
||||||
}
|
}
|
||||||
|
|
|
@ -685,8 +685,8 @@ IntCreatePrimarySurface()
|
||||||
EngEraseSurface(SurfObj, &SurfaceRect, 0); */
|
EngEraseSurface(SurfObj, &SurfaceRect, 0); */
|
||||||
|
|
||||||
/* Put the pointer in the center of the screen */
|
/* Put the pointer in the center of the screen */
|
||||||
GDIDEV(SurfObj)->Pointer.Pos.x = (SurfaceRect.right - SurfaceRect.left) / 2;
|
gpsi->ptCursor.x = (SurfaceRect.right - SurfaceRect.left) / 2;
|
||||||
GDIDEV(SurfObj)->Pointer.Pos.y = (SurfaceRect.bottom - SurfaceRect.top) / 2;
|
gpsi->ptCursor.y = (SurfaceRect.bottom - SurfaceRect.top) / 2;
|
||||||
|
|
||||||
EngUnlockSurface(SurfObj);
|
EngUnlockSurface(SurfObj);
|
||||||
co_IntShowDesktop(IntGetActiveDesktop(), SurfSize.cx, SurfSize.cy);
|
co_IntShowDesktop(IntGetActiveDesktop(), SurfSize.cx, SurfSize.cy);
|
||||||
|
|
Loading…
Reference in a new issue