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.hutte...@who-t.net>
---
 src/synaptics.c    |   34 +++++-----------------------------
 src/synapticsstr.h |    1 -
 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 */
-- 
1.7.10.1

_______________________________________________
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