aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/mi/mipointer.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-15 22:49:12 +0000
committermarha <marha@users.sourceforge.net>2011-03-15 22:49:12 +0000
commit8285341e69cd721c6871b553e45437c767200545 (patch)
tree551508bddc84d1c16c15d961878cd2d2f6edb365 /xorg-server/mi/mipointer.c
parent52b8618bfdaa4725fc403f50fe682d02e7f16435 (diff)
parent5e633abcca598289d0423d89bb400b41e6417259 (diff)
downloadvcxsrv-8285341e69cd721c6871b553e45437c767200545.tar.gz
vcxsrv-8285341e69cd721c6871b553e45437c767200545.tar.bz2
vcxsrv-8285341e69cd721c6871b553e45437c767200545.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/mi/mipointer.c')
-rw-r--r--xorg-server/mi/mipointer.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/xorg-server/mi/mipointer.c b/xorg-server/mi/mipointer.c
index bbb32f745..e8ed106ea 100644
--- a/xorg-server/mi/mipointer.c
+++ b/xorg-server/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)
@@ -560,14 +563,18 @@ miPointerMoveNoEvent (DeviceIntPtr pDev, ScreenPtr pScreen,
* This function is called during the pointer update path in
* GetPointerEvents and friends (and the same in the xwin DDX).
*
+ * The coordinates provided are always absolute. The parameter mode whether
+ * it was relative or absolute movement that landed us at those coordinates.
+ *
* @param pDev The device to move
+ * @param mode Movement mode (Absolute or Relative)
* @param[in,out] x The x coordiante in screen coordinates (in regards to total
* desktop size)
* @param[in,out] y The y coordiante in screen coordinates (in regards to total
* desktop size)
*/
void
-miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y)
+miPointerSetPosition(DeviceIntPtr pDev, int mode, int *x, int *y)
{
miPointerScreenPtr pScreenPriv;
ScreenPtr pScreen;
@@ -612,6 +619,9 @@ miPointerSetPosition(DeviceIntPtr pDev, 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;