Comment 13 for bug 327428

Revision history for this message
Aielyn (g-o) wrote :

Nikil, thanks. Now that I look through the diff between the last working version and the first non-working one, I find that this is indeed where the problem is.

Here's the relevant part of xfree86-driver-synaptics_0.15.2-0ubuntu8_0.99.3-1ubuntu1.diff

@@ -711,11 +782,18 @@
 #endif
        );
     /* X valuator */
- xf86InitValuatorAxisStruct(dev, 0, 0, -1, 1, 0, 1);
+ 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 */
- xf86InitValuatorAxisStruct(dev, 1, 0, -1, 1, 0, 1);
+ if (priv->miny < priv->maxy)
+ xf86InitValuatorAxisStruct(dev, 1, priv->miny, priv->maxy, 1, 0, 1);
+ else
+ xf86InitValuatorAxisStruct(dev, 1, 0, -1, 1, 0, 1);
     xf86InitValuatorDefaults(dev, 1);
+
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
     xf86MotionHistoryAllocate(local);
 #endif

As you'll notice, the 0.15.2 version always set the min and max values for both axes to 0 and -1, respectively, whereas the 0.99.3 version set it to the touchpad's values, which is the cause of the problem. The fact that this change happened at the precise time that this problem first started suggests that this is, indeed, the flaw.