Synaptics: y movements moves 2 pixels each step, why?
Mildred Ki'Lya
ml.mildred593 at online.fr
Sat Nov 8 10:05:36 PST 2008
Le Sat 08/11/2008 à 18:37 Mildred Ki'Lya à écrit:
> So ...
> The problem seems to be down further in the Xorg internals.
> Can someone help me there?
Sorry, i already solved the problem. I just had the idea to look into
the initialisation code and I found (around line 777 in synaptics.c):
/* X valuator */
if (priv->minx < priv->maxx)
xf86InitValuatorAxisStruct(dev, 0, priv->minx, priv->maxx, 1, 0, 1);
else
xf86InitValuatorAxisStruct(dev, 0, 0, -1, 1, 0, 1);
xf86InitValuatorDefaults(dev, 0);
/* Y valuator */
if (priv->miny < priv->maxy)
xf86InitValuatorAxisStruct(dev, 1, priv->miny, priv->maxy, 1, 0, 1);
else
xf86InitValuatorAxisStruct(dev, 1, 0, -1, 1, 0, 1);
It seems that synaptics reports the size of the trackpad to Xorg. And
it seems that Xorg uses that information so when synaptics reports that
the mouse has moved one unit downwards, Xorg, cleverly, moves the mouse
cursor by two pixels to compensate the fact that the trackpad is wider
(900 units) than higher (300 units)
i changed the previous code to:
/* X valuator */
xf86InitValuatorAxisStruct(dev, 0, 0, -1, 1, 0, 1);
xf86InitValuatorDefaults(dev, 0);
xf86InitValuatorAxisStruct(dev, 1, 0, -1, 1, 0, 1);
So now synaptics doesn't report the trackpad size. This has a drawback
though: vertical movements are slower.
So i guess I would be adding few additional options to the synaptics
driver:
Option "DontReportTrackpadSize" "boolean"
This option prevent the synaptics driver from reporting the
size of the trackpad to Xorg. This way, Xorg doesn't amplify
the vertical movements (since most trackpads are wider than
higher)
Option "HorizSpeed" "float"
Horizontal speed. This number is multiplied by the x movement
to produce the horizontal movement of the mouse cursor
Option "VertSpeed" "float"
Vertical speed. This number is multiplied by the x movement
to produce the horizontal movement of the mouse cursor
Do you think it's a good solution?
Mildred
--
Mildred Ki'Lya
╭───────── mildred593@online.fr ──────────
│ Jabber, GoogleTalk: <mildred at jabber.fr>
│ Site: <http://ki.lya.online.fr> GPG ID: 9A7D 2E2B
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B
More information about the xorg
mailing list