summaryrefslogtreecommitdiff
path: root/src/eventcomm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eventcomm.c')
-rw-r--r--src/eventcomm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/eventcomm.c b/src/eventcomm.c
index 6a55df0..41504f9 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -108,7 +108,7 @@ UninitializeTouch(InputInfoPtr pInfo)
SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private;
struct eventcomm_proto_data *proto_data = (struct eventcomm_proto_data*)priv->proto_data;
- if (!proto_data->mtdev)
+ if (!priv->has_touch)
return;
free(proto_data->open_slots);
@@ -136,6 +136,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)
{
@@ -630,6 +633,9 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct CommData *comm,
SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private;
struct eventcomm_proto_data *proto_data = priv->proto_data;
+ if (!priv->has_touch)
+ return;
+
if (ev->code == ABS_MT_SLOT)
{
EventProcessTouch(pInfo);