From 810fbfa44626bff9f443ab17c0ad27ff7ae121d7 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 9 Feb 2011 17:32:16 -0500 Subject: [PATCH] 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 Signed-off-by: Adam Jackson Signed-off-by: Peter Hutterer --- mi/mipointer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mi/mipointer.c b/mi/mipointer.c index 520583f46..c578d0b1d 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -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;