summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-05-17 15:52:50 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-05-18 09:15:52 +1000
commita9d247d076b3d0d1df84f013b3733bd6297dd79b (patch)
tree140db259a16ffd9f460c7b83f24aa56d941a4d81
parent6d47d334d8a876e7e094306c313246b87016b78a (diff)
Remove absolute mode
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>
-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 */