[PATCH synaptics] Drop touch events from the driver

Peter Hutterer peter.hutterer at who-t.net
Tue Jun 30 18:23:52 PDT 2015


On Tue, Jun 30, 2015 at 10:57:21PM +0200, Loïc Yhuel wrote:
> Le 17/06/2015 05:14, Peter Hutterer a écrit :
> >Drop the touch events from the synaptics driver. This allows us to switch the
> >touchpad fully over to look like a relative device, thus also removing the
> >bug that changes the touchpad speed whenever a monitor is added/removed in.
> >
> >
> Hi,
> 
> I applied this patch on top of 1.8.2, but the speed still changes when a
> monitor is added.
> Like with 1.8.2, xinput lists "Rel X" / "Rel Y" as relative, but with an
> absolute range (1742 - 5472 for example).

this patch was only one part, I haven't gotten to the issue above yet. As a
hint, the patch below is the second part but you'll find that pointer
acceleration is completely different after applying it. This is the part
that's missing, re-adjusting pointer acceleration so that it feels mostly
the same as before. Once that's done we can go ahead so feel free to have a
go at that.

Cheers,
   Peter

>From 3a32f9d84dd852d29bfb35fb676bf722d717a26f Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer at who-t.net>
Date: Thu, 26 Mar 2015 16:46:29 +1000
Subject: [PATCH synaptics] Init the x/y axis as relative axes

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/synaptics.c | 31 ++-----------------------------
 1 file changed, 2 insertions(+), 29 deletions(-)

diff --git a/src/synaptics.c b/src/synaptics.c
index 550b31c..7708a02 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1215,7 +1215,6 @@ DeviceInit(DeviceIntPtr dev)
     float tmpf;
     unsigned char map[SYN_MAX_BUTTONS + 1];
     int i;
-    int min, max;
     int num_axes = 2;
     Atom btn_labels[SYN_MAX_BUTTONS] = { 0 };
     Atom *axes_labels;
@@ -1290,34 +1289,8 @@ DeviceInit(DeviceIntPtr dev)
     }
 
     /* X valuator */
-    if (priv->minx < priv->maxx) {
-        min = priv->minx;
-        max = priv->maxx;
-    }
-    else {
-        min = 0;
-        max = -1;
-    }
-
-    xf86InitValuatorAxisStruct(dev, 0, axes_labels[0], min, max,
-			       priv->resx * 1000, 0, priv->resx * 1000,
-			       Relative);
-    xf86InitValuatorDefaults(dev, 0);
-
-    /* Y valuator */
-    if (priv->miny < priv->maxy) {
-        min = priv->miny;
-        max = priv->maxy;
-    }
-    else {
-        min = 0;
-        max = -1;
-    }
-
-    xf86InitValuatorAxisStruct(dev, 1, axes_labels[1], min, max,
-			       priv->resy * 1000, 0, priv->resy * 1000,
-			       Relative);
-    xf86InitValuatorDefaults(dev, 1);
+    xf86InitValuatorAxisStruct(dev, 0, axes_labels[0], -1, -1, 1, 0, 1, Relative);
+    xf86InitValuatorAxisStruct(dev, 1, axes_labels[1], -1, -1, 1, 0, 1, Relative);
 
     xf86InitValuatorAxisStruct(dev, 2, axes_labels[2], 0, -1, 0, 0, 0,
                                Relative);
-- 
2.4.3




More information about the xorg-devel mailing list