[PATCH v3 03/23] Bump minimum xorg-server requirement to 1.7

Daniel Stone daniel at fooishbar.org
Thu Jun 23 15:12:38 PDT 2011


This means we can also drop support for pre-ABI v7.

Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
 configure.ac    |    2 +-
 src/synaptics.c |   28 +++++-----------------------
 2 files changed, 6 insertions(+), 24 deletions(-)

v3: New.

diff --git a/configure.ac b/configure.ac
index bf99958..bf107e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,7 +54,7 @@ m4_ifndef([XORG_DRIVER_CHECK_EXT],
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
 
 # Obtain compiler/linker options for the Synaptics driver dependencies
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6] xproto inputproto $REQUIRED_MODULES)
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.7] xproto inputproto $REQUIRED_MODULES)
 
 # X Server SDK location is required to install Synaptics header files
 # This location is also relayed in the xorg-synaptics.pc file
diff --git a/src/synaptics.c b/src/synaptics.c
index 40eca99..30f17a9 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -70,11 +70,9 @@
 #include <xf86Xinput.h>
 #include <exevents.h>
 
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
 #include <X11/Xatom.h>
 #include <xserver-properties.h>
 #include <ptrveloc.h>
-#endif
 
 #include "synaptics.h"
 #include "synapticsstr.h"
@@ -907,7 +905,6 @@ DeviceClose(DeviceIntPtr dev)
     return RetValue;
 }
 
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
 static void InitAxesLabels(Atom *labels, int nlabels)
 {
     memset(labels, 0, nlabels * sizeof(Atom));
@@ -945,7 +942,6 @@ static void InitButtonLabels(Atom *labels, int nlabels)
             break;
     }
 }
-#endif
 
 static Bool
 DeviceInit(DeviceIntPtr dev)
@@ -957,14 +953,12 @@ DeviceInit(DeviceIntPtr dev)
     unsigned char map[SYN_MAX_BUTTONS + 1];
     int i;
     int min, max;
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
     Atom btn_labels[SYN_MAX_BUTTONS] = { 0 };
     Atom axes_labels[2] = { 0 };
     DeviceVelocityPtr pVel;
 
     InitAxesLabels(axes_labels, 2);
     InitButtonLabels(btn_labels, SYN_MAX_BUTTONS);
-#endif
 
     DBG(3, "Synaptics DeviceInit called\n");
 
@@ -975,22 +969,17 @@ DeviceInit(DeviceIntPtr dev)
 
     InitPointerDeviceStruct((DevicePtr)dev, map,
 			    SYN_MAX_BUTTONS,
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
                             btn_labels,
-#endif
 			    SynapticsCtrl,
-			    GetMotionHistorySize(), 2
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-                            , axes_labels
-#endif
-			    );
+			    GetMotionHistorySize(),
+                            2,
+                            axes_labels);
 
     /*
      * setup dix acceleration to match legacy synaptics settings, and
      * etablish a device-specific profile to do stuff like pressure-related
      * acceleration.
      */
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
     if (NULL != (pVel = GetDevicePredictableAccelData(dev))) {
 	SetDeviceSpecificAccelerationProfile(pVel,
 	                                     SynapticsAccelerationProfile);
@@ -1026,7 +1015,6 @@ DeviceInit(DeviceIntPtr dev)
 	XIChangeDeviceProperty(dev, prop, XA_INTEGER, 32,
 	                       PropModeReplace, 1, &i, FALSE);
     }
-#endif
 
     /* X valuator */
     if (priv->minx < priv->maxx)
@@ -1039,10 +1027,7 @@ DeviceInit(DeviceIntPtr dev)
         max = -1;
     }
 
-    xf86InitValuatorAxisStruct(dev, 0,
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-            axes_labels[0],
-#endif
+    xf86InitValuatorAxisStruct(dev, 0, axes_labels[0],
             min, max, priv->resx * 1000, 0, priv->resx * 1000
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
             , Relative
@@ -1061,10 +1046,7 @@ DeviceInit(DeviceIntPtr dev)
         max = -1;
     }
 
-    xf86InitValuatorAxisStruct(dev, 1,
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
-            axes_labels[1],
-#endif
+    xf86InitValuatorAxisStruct(dev, 1, axes_labels[1],
             min, max, priv->resy * 1000, 0, priv->resy * 1000
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
             , Relative
-- 
1.7.5.4



More information about the xorg-devel mailing list