[PATCH synaptics] Submit the right number of MT axes
Peter Hutterer
peter.hutterer at who-t.net
Mon Feb 6 09:34:47 PST 2012
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 at who-t.net>
---
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
More information about the xorg-devel
mailing list