Commit 810fbfa4 authored by Adam Jackson's avatar Adam Jackson 🦃

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's avatarDaniel Stone <>
Signed-off-by: Adam Jackson's avatarAdam Jackson <>
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <>
parent 769531b9
......@@ -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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment