diff options
Diffstat (limited to 'src/ws.c')
-rw-r--r-- | src/ws.c | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -339,6 +339,10 @@ wsProc(DeviceIntPtr pWS, int what) WSDevicePtr priv = (WSDevicePtr)XI_PRIVATE(pWS); unsigned char map[NBUTTONS + 1]; int i; +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + Atom btn_labels[NBUTTONS] = {0}; + Atom axes_labels[NAXES] = {0}; +#endif switch (what) { case DEVICE_INIT: @@ -353,6 +357,9 @@ wsProc(DeviceIntPtr pWS, int what) map[i + 1] = i + 1; InitPointerDeviceStruct((DevicePtr)pWS, map, min(priv->buttons, NBUTTONS), +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + btn_labels, +#endif #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 miPointerGetMotionEvents, #elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 @@ -364,11 +371,22 @@ wsProc(DeviceIntPtr pWS, int what) #else GetMotionHistorySize(), NAXES #endif +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + , axes_labels +#endif ); - xf86InitValuatorAxisStruct(pWS, 0, 0, -1, 1, 0, 1); + xf86InitValuatorAxisStruct(pWS, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + axes_labels[0], +#endif + 0, 0, -1, 1, 0, 1); xf86InitValuatorDefaults(pWS, 0); - xf86InitValuatorAxisStruct(pWS, 1, 0, -1, 1, 0, 1); + xf86InitValuatorAxisStruct(pWS, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + axes_labels[1], +#endif + 1, 0, -1, 1, 0, 1); xf86InitValuatorDefaults(pWS, 1); xf86MotionHistoryAllocate(pInfo); AssignTypeAndName(pWS, pInfo->atom, pInfo->name); |