[PATCH penmount 01/10] Require server 1.9, drop earlier ABI support
Peter Hutterer
peter.hutterer at who-t.net
Wed Dec 1 20:37:48 PST 2010
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
configure.ac | 2 +-
src/xf86PM.c | 27 +++------------------------
2 files changed, 4 insertions(+), 25 deletions(-)
diff --git a/configure.ac b/configure.ac
index 3eb54cc..94869c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,7 +64,7 @@ XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto $REQUIRED_MODULES)
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.9.0] xproto $REQUIRED_MODULES)
# Define an Automake variable for the driver name
DRIVER_NAME=penmount
diff --git a/src/xf86PM.c b/src/xf86PM.c
index 5a3f8a8..7b42d62 100644
--- a/src/xf86PM.c
+++ b/src/xf86PM.c
@@ -143,9 +143,7 @@ ProcessDeviceInit(PenMountPrivatePtr priv, DeviceIntPtr dev, InputInfoPtr pInfo)
* Device reports button press for 1 button.
*/
if (InitButtonClassDeviceStruct (dev, 1,
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
&btn_label,
-#endif
map) == FALSE)
{
ErrorF ("Unable to allocate PenMount ButtonClassDeviceStruct\n");
@@ -156,13 +154,7 @@ ProcessDeviceInit(PenMountPrivatePtr priv, DeviceIntPtr dev, InputInfoPtr pInfo)
* Device reports motions on 2 axes in absolute coordinates.
* Axes min and max values are reported in raw coordinates.
*/
- if (InitValuatorClassDeviceStruct (dev, 2,
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
- axis_labels,
-#endif
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
- xf86GetMotionEvents,
-#endif
+ if (InitValuatorClassDeviceStruct (dev, 2, axis_labels,
pInfo->history_size, Absolute) == FALSE)
{
ErrorF ("Unable to allocate PenMount ValuatorClassDeviceStruct\n");
@@ -192,18 +184,12 @@ ProcessDeviceInit(PenMountPrivatePtr priv, DeviceIntPtr dev, InputInfoPtr pInfo)
min_y = 0;
}
- InitValuatorAxisStruct (dev, 0,
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
- axis_labels[0],
-#endif
+ InitValuatorAxisStruct (dev, 0, axis_labels[0],
min_x, max_x,
9500,
0 /* min_res */ ,
9500 /* max_res */ );
- InitValuatorAxisStruct (dev, 1,
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
- axis_labels[1],
-#endif
+ InitValuatorAxisStruct (dev, 1, axis_labels[1],
min_y, max_y,
10500,
0 /* min_res */ ,
@@ -917,13 +903,6 @@ SwitchMode (ClientPtr client, DeviceIntPtr dev, int mode)
priv->reporting_mode = mode;
return (Success);
}
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
- else if ((mode == SendCoreEvents) || (mode == DontSendCoreEvents))
- {
- xf86XInputSetSendCoreEvents (pInfo, (mode == SendCoreEvents));
- return (Success);
- }
-#endif
else
return (!Success);
}
--
1.7.3.2
More information about the xorg-devel
mailing list