summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2011-02-09 17:32:16 -0500
committerAdam Jackson <ajax@redhat.com>2011-03-14 13:35:51 -0400
commit810fbfa44626bff9f443ab17c0ad27ff7ae121d7 (patch)
tree7eef24dc7665515abb398285ff6316be5b402ad1
parent769531b9ccade723a56498b0888af58d085fec9e (diff)
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>
-rw-r--r--mi/mipointer.c6
1 files changed, 6 insertions, 0 deletions
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;