From 3c4795fbe5ef6444a890e2baf8edf0e01530cea2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 2 Dec 2010 12:58:49 +1000 Subject: Require server 1.9, drop earlier ABI support Signed-off-by: Peter Hutterer Reviewed-by: Cyril Brulebois --- configure.ac | 2 +- src/xf86Fpit.c | 46 ++++++++-------------------------------------- 2 files changed, 9 insertions(+), 39 deletions(-) diff --git a/configure.ac b/configure.ac index d1a87eb..9c3a9a0 100644 --- a/configure.ac +++ b/configure.ac @@ -58,7 +58,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) sdkdir=$(pkg-config --variable=sdkdir xorg-server) XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS" diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c index cb98884..0f7f8ff 100644 --- a/src/xf86Fpit.c +++ b/src/xf86Fpit.c @@ -187,9 +187,7 @@ static void xf86FpitSetUpAxes(DeviceIntPtr dev, FpitPrivatePtr priv) * screen to fit one meter. */ int quarter_turns; -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 Atom axis_labels[2] = { 0, 0 }; -#endif priv->screen_width = screenInfo.screens[priv->screen_no]->width; priv->screen_height = screenInfo.screens[priv->screen_no]->height; @@ -214,29 +212,17 @@ static void xf86FpitSetUpAxes(DeviceIntPtr dev, FpitPrivatePtr priv) } if (priv->fpitTotalOrientation & FPIT_THEN_SWAP_XY) { - InitValuatorAxisStruct(dev, 1, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 - axis_labels[1], -#endif + InitValuatorAxisStruct(dev, 1, axis_labels[1], priv->fpitMinX, priv->fpitMaxX, 9500, 0 /* min_res */ , 9500 /* max_res */ ); - InitValuatorAxisStruct(dev, 0, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 - axis_labels[0], -#endif + InitValuatorAxisStruct(dev, 0, axis_labels[0], priv->fpitMinY, priv->fpitMaxY, 10500, 0 /* min_res */ , 10500 /* max_res */ ); } else { - InitValuatorAxisStruct(dev, 0, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 - axis_labels[0], -#endif + InitValuatorAxisStruct(dev, 0, axis_labels[0], priv->fpitMinX, priv->fpitMaxX, 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], priv->fpitMinY, priv->fpitMaxY, 10500, 0 /* min_res */ , 10500 /* max_res */ ); } @@ -337,9 +323,6 @@ static void xf86FpitReadInput(InputInfoPtr pInfo) prox = (priv->fpitData[loop] & PROXIMITY_BIT) ? 0 : 1; buttons = (priv->fpitData[loop] & BUTTON_BITS); device = pInfo->dev; -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 - is_core_pointer = xf86IsCorePointer(device); -#endif xf86FpitConvert(pInfo, 0, 2, x, y, 0, 0, 0, 0, &conv_x, &conv_y); xf86XInputSetScreen(pInfo, priv->screen_no, conv_x, conv_y); @@ -426,11 +409,8 @@ static Bool xf86FpitControl(DeviceIntPtr dev, int mode) unsigned char map[] = { 0, 1, 2, 3 /* DMC: changed this so we can use all three buttons */ }; -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 Atom btn_labels[3] = { 0 }; Atom axis_labels[2] = { 0, 0 }; -#endif - switch (mode) { case DEVICE_INIT: @@ -442,11 +422,7 @@ static Bool xf86FpitControl(DeviceIntPtr dev, int mode) /* * Device reports button press for up to 3 buttons. */ - if (InitButtonClassDeviceStruct(dev, 3, -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 - btn_labels, -#endif - map) == FALSE) { + if (InitButtonClassDeviceStruct(dev, 3, btn_labels, map) == FALSE) { ErrorF("Unable to allocate Fpit touchscreen ButtonClassDeviceStruct\n"); return !Success; } @@ -459,15 +435,9 @@ static Bool xf86FpitControl(DeviceIntPtr dev, int mode) if(InitPtrFeedbackClassDeviceStruct(dev, xf86FpitPtrCtrl) == FALSE) { ErrorF("Unable to allocate PtrFeedBackClassDeviceStruct\n"); } - - 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 - pInfo->history_size, Absolute) == FALSE) { + + if (InitValuatorClassDeviceStruct(dev, 2, axis_labels, + pInfo->history_size, Absolute) == FALSE) { ErrorF("Unable to allocate Fpit touchscreen ValuatorClassDeviceStruct\n"); return !Success; } -- cgit v1.2.3