summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Shaw <joe@joeshaw.org>2010-10-08 15:20:42 -0400
committerPeter Hutterer <peter.hutterer@who-t.net>2010-10-14 15:00:58 +1000
commita7637b5b3782f6f7b8efadaa459e9e365701d88b (patch)
tree19e89fcd655bc82594ee977b4195caed680be80e
parent0b28a4c046a30ccb83278ea0aa59541fad89092c (diff)
post absolute coordinate motion events if device mode is absolute
Signed-off-by: Joe Shaw <joe@joeshaw.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/synaptics.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index 4d3e6d7..a4445e9 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2423,8 +2423,12 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw)
ScaleCoordinates(priv, hw);
}
- timeleft = ComputeDeltas(priv, hw, edge, &dx, &dy, inside_active_area);
- delay = MIN(delay, timeleft);
+ dx = dy = 0;
+
+ if (!priv->absolute_events) {
+ timeleft = ComputeDeltas(priv, hw, edge, &dx, &dy, inside_active_area);
+ delay = MIN(delay, timeleft);
+ }
buttons = ((hw->left ? 0x01 : 0) |
@@ -2449,8 +2453,11 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw)
}
/* Post events */
- if (dx || dy)
- xf86PostMotionEvent(pInfo->dev, 0, 0, 2, dx, dy);
+ if (priv->absolute_events && inside_active_area) {
+ xf86PostMotionEvent(pInfo->dev, 1, 0, 2, hw->x, hw->y);
+ } else if (dx || dy) {
+ xf86PostMotionEvent(pInfo->dev, 0, 0, 2, dx, dy);
+ }
if (priv->mid_emu_state == MBE_LEFT_CLICK)
{