For devices with only x/y, num_mt_axes is 0, since x/y are already counted
elsewhere. The server will then fail to init the TouchClassRec since it
expects at least 2 touch axes. Fix this, assume we always have at least two
touch axes if we have any touch axes at all.

Signed-off-by: Peter Hutterer <[email protected]>
---
 src/synaptics.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/synaptics.c b/src/synaptics.c
index c3df66e..9937634 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1145,8 +1145,9 @@ DeviceInit(DeviceIntPtr dev)
 #ifdef HAVE_MULTITOUCH
     if (priv->has_touch)
     {
+        /* x/y + whatever other MT axes we found */
         if (!InitTouchClassDeviceStruct(dev, priv->num_touches,
-                                        XIDependentTouch, priv->num_mt_axes))
+                                        XIDependentTouch, 2 + 
priv->num_mt_axes))
         {
             xf86IDrvMsg(pInfo, X_ERROR,
                         "failed to initialize touch class device\n");
-- 
1.7.7.5

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to