[PATCH synaptics 11/11] Require server 1.6 or later.

Peter Hutterer peter.hutterer at who-t.net
Tue Jun 15 17:21:28 PDT 2010


Remove ifdef's for server ABIs up to including server 1.5. Driver still
supports 1.6, 1.7, 1.8 and the upcoming 1.9.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 configure.ac     |    2 +-
 src/properties.c |    3 ---
 src/synaptics.c  |   29 -----------------------------
 3 files changed, 1 insertions(+), 33 deletions(-)

diff --git a/configure.ac b/configure.ac
index c41b691..34e8d83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,7 @@ AC_CHECK_LIB([m], [rint])
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
 
 # Obtain compiler/linker options for the Synaptics driver dependencies
-PKG_CHECK_MODULES(XORG, xorg-server xproto inputproto $REQUIRED_MODULES)
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6] 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/properties.c b/src/properties.c
index 1134f7c..a5d37b3 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -29,7 +29,6 @@
 
 #include <xorg-server.h>
 #include "xf86Module.h"
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
 
 #include <X11/Xatom.h>
 #include <xf86.h>
@@ -660,5 +659,3 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
     return Success;
 }
 
-#endif
-
diff --git a/src/synaptics.c b/src/synaptics.c
index 2343102..88b7471 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -70,10 +70,6 @@
 #include <xf86Xinput.h>
 #include <exevents.h>
 
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
-#include "mipointer.h"
-#endif
-
 #include "synaptics.h"
 #include "synapticsstr.h"
 #include "synaptics-properties.h"
@@ -133,11 +129,9 @@ static void ReadDevDimensions(LocalDevicePtr);
 static void ScaleCoordinates(SynapticsPrivate *priv, struct SynapticsHwState *hw);
 static void CalculateScalingCoeffs(SynapticsPrivate *priv);
 
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
 void InitDeviceProperties(LocalDevicePtr local);
 int SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
                 BOOL checkonly);
-#endif
 
 InputDriverRec SYNAPTICS = {
     1,
@@ -657,10 +651,6 @@ SynapticsPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
     local->private_flags           = 0;
     local->flags                   = XI86_POINTER_CAPABLE | XI86_SEND_DRAG_EVENTS;
     local->conf_idev               = dev;
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
-    local->motion_history_proc     = xf86GetMotionEvents;
-    local->history_size            = 0;
-#endif
     local->always_core_feedback    = 0;
 
     xf86Msg(X_INFO, "Synaptics touchpad driver version %s\n", PACKAGE_VERSION);
@@ -709,10 +699,6 @@ SynapticsPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 	goto SetupProc_fail;
     }
 
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
-    local->history_size = xf86SetIntOption(local->options, "HistorySize", 0);
-#endif
-
     xf86ProcessCommonOptions(local, local->options);
     local->flags |= XI86_CONFIGURED;
 
@@ -948,17 +934,8 @@ DeviceInit(DeviceIntPtr dev)
 #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
-			    GetMotionHistory,
-#endif
 			    SynapticsCtrl,
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
-			    miPointerGetMotionBufferSize()
-#else
 			    GetMotionHistorySize(), 2
-#endif
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
                             , axes_labels
 #endif
@@ -1043,17 +1020,11 @@ DeviceInit(DeviceIntPtr dev)
             min, max, priv->resy * 1000, 0, priv->resy * 1000);
     xf86InitValuatorDefaults(dev, 1);
 
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
-    xf86MotionHistoryAllocate(local);
-#endif
-
     if (!alloc_param_data(local))
 	return !Success;
 
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
     InitDeviceProperties(local);
     XIRegisterPropertyHandler(local->dev, SetProperty, NULL, NULL);
-#endif
 
     return Success;
 }
-- 
1.7.0.1



More information about the xorg-devel mailing list