diff options
Diffstat (limited to 'src/eventcomm.c')
-rw-r--r-- | src/eventcomm.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/eventcomm.c b/src/eventcomm.c index 3b32425..801d19f 100644 --- a/src/eventcomm.c +++ b/src/eventcomm.c @@ -865,6 +865,9 @@ 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) @@ -895,8 +898,14 @@ event_query_touch(InputInfoPtr pInfo) case ABS_MT_TRACKING_ID - ABS_MT_TOUCH_MAJOR: break; - default: - priv->touch_axes[axnum].label = labels[i]; + 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]; + 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 */ |