[PATCH synaptics 5/5] Don't initialize touch state if device does is not multitouch
Chase Douglas
chase.douglas at canonical.com
Wed Feb 1 15:50:19 PST 2012
And don't attempt to use it either.
Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
---
src/eventcomm.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/eventcomm.c b/src/eventcomm.c
index 4cbdd3e..b261d7f 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -133,6 +133,9 @@ InitializeTouch(InputInfoPtr pInfo)
struct eventcomm_proto_data *proto_data = (struct eventcomm_proto_data*)priv->proto_data;
int i;
+ if (!priv->has_touch)
+ return;
+
proto_data->mtdev = mtdev_new_open(pInfo->fd);
if (!proto_data->mtdev)
{
@@ -627,7 +630,7 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct CommData *comm,
SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private;
struct eventcomm_proto_data *proto_data = priv->proto_data;
- if (!proto_data)
+ if (!proto_data || !priv->has_touch)
return;
if (ev->code == ABS_MT_SLOT)
--
1.7.8.3
More information about the xorg-devel
mailing list