summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-05-20 15:00:09 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-06-29 05:15:03 +1000
commit291c3ec1d4bdf7a110403284d3fbb35bb487b211 (patch)
treedb4f6bb804ee0ce15ca5f9f709b2d69881139a59
parent4cb20983601517f3b4b9feb912a69323a8ebe980 (diff)
downloadxf86-input-wacom-291c3ec1d4bdf7a110403284d3fbb35bb487b211.tar.gz
Input API 12 requires a valuator mode for each axis.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Chris Bagwell <chris@cnpbagwell.com> (cherry picked from commit c6dcc3a1f78b6eb2e3d0ac1b7074ec5b94d5c209) Conflicts: src/xf86Wacom.c
-rw-r--r--src/xf86Wacom.c72
1 files changed, 60 insertions, 12 deletions
diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
index 54fd0bc..b46d821 100644
--- a/src/xf86Wacom.c
+++ b/src/xf86Wacom.c
@@ -442,7 +442,11 @@ void wcmInitialCoordinates(InputInfoPtr pInfo, int axis)
XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X),
#endif
topx, bottomx,
- resolution_x, 0, resolution_x);
+ resolution_x, 0, resolution_x
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Absolute
+#endif
+ );
break;
case 1:
InitValuatorAxisStruct(pInfo->dev, 1,
@@ -450,7 +454,11 @@ void wcmInitialCoordinates(InputInfoPtr pInfo, int axis)
XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y),
#endif
topy, bottomy,
- resolution_y, 0, resolution_y);
+ resolution_y, 0, resolution_y
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Absolute
+#endif
+ );
break;
default:
xf86Msg(X_ERROR, "%s: Cannot initialize axis %d.\n", pInfo->name, axis);
@@ -842,7 +850,11 @@ static int wcmRegisterX11Devices (InputInfoPtr pInfo)
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE),
#endif
- 0, common->wcmMaxZ, 1, 1, 1);
+ 0, common->wcmMaxZ, 1, 1, 1
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Absolute
+#endif
+ );
if (IsCursor(priv))
{
@@ -851,12 +863,20 @@ static int wcmRegisterX11Devices (InputInfoPtr pInfo)
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
XIGetKnownProperty(AXIS_LABEL_PROP_ABS_RZ),
#endif
- -900, 899, 1, 1, 1);
+ -900, 899, 1, 1, 1
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Absolute
+#endif
+ );
InitValuatorAxisStruct(pInfo->dev, 4,
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
XIGetKnownProperty(AXIS_LABEL_PROP_ABS_THROTTLE),
#endif
- -1023, 1023, 1, 1, 1);
+ -1023, 1023, 1, 1, 1
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Absolute
+#endif
+ );
}
else if (IsPad(priv))
{
@@ -868,12 +888,20 @@ static int wcmRegisterX11Devices (InputInfoPtr pInfo)
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
0, /* XXX what is this axis?*/
#endif
- 0, common->wcmMaxStripX, 1, 1, 1);
+ 0, common->wcmMaxStripX, 1, 1, 1
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Absolute
+#endif
+ );
InitValuatorAxisStruct(pInfo->dev, 4,
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
0, /* XXX what is this axis?*/
#endif
- 0, common->wcmMaxStripY, 1, 1, 1);
+ 0, common->wcmMaxStripY, 1, 1, 1
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Absolute
+#endif
+ );
}
}
else
@@ -883,12 +911,20 @@ static int wcmRegisterX11Devices (InputInfoPtr pInfo)
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_X),
#endif
- -64, 63, 1, 1, 1);
+ -64, 63, 1, 1, 1
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Absolute
+#endif
+ );
InitValuatorAxisStruct(pInfo->dev, 4,
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_Y),
#endif
- -64, 63, 1, 1, 1);
+ -64, 63, 1, 1, 1
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Absolute
+#endif
+ );
}
if ((strstr(common->wcmModel->name, "Intuos3") ||
@@ -900,7 +936,11 @@ static int wcmRegisterX11Devices (InputInfoPtr pInfo)
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
0, /* XXX what is this axis?*/
#endif
- -900, 899, 1, 1, 1);
+ -900, 899, 1, 1, 1
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Absolute
+#endif
+ );
else if ((strstr(common->wcmModel->name, "Bamboo") ||
strstr(common->wcmModel->name, "Intuos4"))
&& IsPad(priv))
@@ -909,7 +949,11 @@ static int wcmRegisterX11Devices (InputInfoPtr pInfo)
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
0, /* XXX what is this axis?*/
#endif
- 0, 71, 1, 1, 1);
+ 0, 71, 1, 1, 1
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Absolute
+#endif
+ );
else
{
/* absolute wheel */
@@ -917,7 +961,11 @@ static int wcmRegisterX11Devices (InputInfoPtr pInfo)
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
XIGetKnownProperty(AXIS_LABEL_PROP_ABS_WHEEL),
#endif
- 0, 1023, 1, 1, 1);
+ 0, 1023, 1, 1, 1
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Absolute
+#endif
+ );
}
if (IsTouch(priv))