summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2015-01-05 09:39:54 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2015-01-05 09:47:39 +1000
commit709e9673187b3fcd0ac0785651ebca2035aa26eb (patch)
tree2f5166e632c0bcf258e7e56324cc815cc1e1a3d9
parentd3331b5802602c059e311cffb17e4a18d4ae93f4 (diff)
Revert "eventcomm: add missing axis labels to avoid array overrun"
Bad backport, had a superfluous break which made it half-work on some devices. On Apple touchpads, it crashes outright, but the real fix is a bit more involved. This reverts commit fbf8df16694dd60d854f05f1f59a786c3df3529a. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/eventcomm.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/eventcomm.c b/src/eventcomm.c
index 801d19f..3b32425 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -865,9 +865,6 @@ event_query_touch(InputInfoPtr pInfo)
AXIS_LABEL_PROP_ABS_MT_BLOB_ID,
AXIS_LABEL_PROP_ABS_MT_TRACKING_ID,
AXIS_LABEL_PROP_ABS_MT_PRESSURE,
- AXIS_LABEL_PROP_ABS_MT_DISTANCE,
- AXIS_LABEL_PROP_ABS_MT_TOOL_X,
- AXIS_LABEL_PROP_ABS_MT_TOOL_Y,
};
if (mtdev->caps.slot.maximum > 0)
@@ -898,14 +895,8 @@ event_query_touch(InputInfoPtr pInfo)
case ABS_MT_TRACKING_ID - ABS_MT_TOUCH_MAJOR:
break;
- if (i >= sizeof(labels)/sizeof(labels[0])) {
- xf86IDrvMsg(pInfo, X_ERROR,
- "Axis %d out of label range. This is a bug\n",
- i);
- priv->touch_axes[axnum].label = NULL;
- } else
- priv->touch_axes[axnum].label = labels[i];
-
+ default:
+ priv->touch_axes[axnum].label = labels[i];
priv->touch_axes[axnum].min = mtdev->caps.abs[i].minimum;
priv->touch_axes[axnum].max = mtdev->caps.abs[i].maximum;
/* Kernel provides units/mm, X wants units/m */