summaryrefslogtreecommitdiff
authorPeter Hutterer <peter.hutterer@who-t.net>2012-05-17 05:52:50 (GMT)
committer Peter Hutterer <peter.hutterer@who-t.net>2012-05-17 23:15:52 (GMT)
commita9d247d076b3d0d1df84f013b3733bd6297dd79b (patch) (side-by-side diff)
tree140db259a16ffd9f460c7b83f24aa56d941a4d81
parent6d47d334d8a876e7e094306c313246b87016b78a (diff)
downloadxf86-input-synaptics-master.zip
xf86-input-synaptics-master.tar.gz
Remove absolute modeHEADmaster
Moving a touchpad in absolute mode is unusual - touchpads are disconnected from the output device, so direct interaction is hard. There appears to be little usage of it (I haven't seen bug reports from people claiming to use it). Joe Shaw, author of the code and only known user doesn't have a use for it anymore, so purge it from the repo. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/synaptics.c34
-rw-r--r--src/synapticsstr.h1
2 files changed, 5 insertions, 30 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index 146afd8..8b78b9a 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2839,10 +2839,8 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
dx = dy = 0;
- if (!priv->absolute_events) {
- timeleft = ComputeDeltas(priv, hw, edge, &dx, &dy, inside_active_area);
- delay = MIN(delay, timeleft);
- }
+ timeleft = ComputeDeltas(priv, hw, edge, &dx, &dy, inside_active_area);
+ delay = MIN(delay, timeleft);
buttons = ((hw->left ? 0x01 : 0) |
(hw->middle ? 0x02 : 0) |
@@ -2867,14 +2865,8 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
}
/* Post events */
- if (finger >= FS_TOUCHED) {
- 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 (finger >= FS_TOUCHED && (dx || dy))
+ xf86PostMotionEvent(pInfo->dev, 0, 0, 2, dx, dy);
if (priv->mid_emu_state == MBE_LEFT_CLICK) {
post_button_click(pInfo, 1);
@@ -2933,25 +2925,9 @@ ControlProc(InputInfoPtr pInfo, xDeviceCtl * control)
static int
SwitchMode(ClientPtr client, DeviceIntPtr dev, int mode)
{
- InputInfoPtr pInfo = (InputInfoPtr) dev->public.devicePrivate;
- SynapticsPrivate *priv = (SynapticsPrivate *) (pInfo->private);
-
DBG(3, "SwitchMode called\n");
- switch (mode) {
- case Absolute:
- priv->absolute_events = TRUE;
- break;
-
- case Relative:
- priv->absolute_events = FALSE;
- break;
-
- default:
- return XI_BadMode;
- }
-
- return Success;
+ return XI_BadMode;
}
static void
diff --git a/src/synapticsstr.h b/src/synapticsstr.h
index 5b0120a..384b7bb 100644
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -201,7 +201,6 @@ struct _SynapticsPrivateRec {
struct SynapticsHwState *local_hw_state; /* used in place of local hw state variables */
- Bool absolute_events; /* post absolute motion events instead of relative */
SynapticsMoveHistRec move_hist[SYNAPTICS_MOVE_HISTORY]; /* movement history */
int hist_index; /* Last added entry in move_hist[] */
int hyst_center_x; /* center x of hysteresis */