summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-02-07 03:33:01 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-02-07 06:14:13 +1000
commit141d9120b1ff4a88a09a1df7d63a4854447346ec (patch)
treedcf3756826be9ff64e08b53454492e905875bd27
parente4ee51e771a6da247362549044a076462791022b (diff)
Submit the right number of MT axes
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 <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--src/synaptics.c3
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");