mi: Call pScreen->ConstrainCursorHarder from the position update path
v2: Cover more paths, spotted by Daniel Stone. v3: pass down the mode field for movement mode. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
769531b9cc
commit
810fbfa446
|
@ -272,6 +272,9 @@ miPointerSetCursorPosition(DeviceIntPtr pDev, ScreenPtr pScreen,
|
|||
|
||||
pPointer->generateEvent = generateEvent;
|
||||
|
||||
if (pScreen->ConstrainCursorHarder)
|
||||
pScreen->ConstrainCursorHarder(pDev, pScreen, Absolute, &x, &y);
|
||||
|
||||
/* device dependent - must pend signal and call miPointerWarpCursor */
|
||||
(*pScreenPriv->screenFuncs->WarpCursor) (pDev, pScreen, x, y);
|
||||
if (!generateEvent)
|
||||
|
@ -616,6 +619,9 @@ miPointerSetPosition(DeviceIntPtr pDev, int mode, int *x, int *y)
|
|||
if (*y >= pPointer->limits.y2)
|
||||
*y = pPointer->limits.y2 - 1;
|
||||
|
||||
if (pScreen->ConstrainCursorHarder)
|
||||
pScreen->ConstrainCursorHarder(pDev, pScreen, mode, x, y);
|
||||
|
||||
if (pPointer->x == *x && pPointer->y == *y &&
|
||||
pPointer->pScreen == pScreen)
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue
Block a user