From: Adam Jackson <a...@redhat.com>

v2: Cover more paths, spotted by Daniel Stone.
v3: pass down the mode field for movement mode.

Reviewed-by: Daniel Stone <dan...@fooishbar.org>
Signed-off-by: Adam Jackson <a...@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
 mi/mipointer.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/mi/mipointer.c b/mi/mipointer.c
index 250d26b..466600f 100644
--- a/mi/mipointer.c
+++ b/mi/mipointer.c
@@ -253,6 +253,10 @@ miPointerSetCursorPosition(DeviceIntPtr pDev, ScreenPtr 
pScreen,
     SetupScreen (pScreen);
 
     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)
@@ -570,6 +574,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;
-- 
1.7.4

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to