Commit 5552167e authored by Jesper Smith's avatar Jesper Smith Committed by Peter Osterlund
Browse files

Fix to make the driver work on newest xorg GIT.

parent 0b7cbc8b
......@@ -60,6 +60,10 @@
#define PS2DBG(x)
#endif
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 1
#define DBG(a,b)
#endif
/*****************************************************************************
* PS/2 Utility functions.
* Many parts adapted from tpconfig.c by C. Scott Ananian
......
......@@ -113,6 +113,10 @@ typedef enum {
#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
#endif
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 1
#define DBG(a,b)
#endif
/*****************************************************************************
* Forward declaration
****************************************************************************/
......@@ -323,8 +327,10 @@ 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 (%d)\n", VERSION, VERSION_ID);
......@@ -458,8 +464,6 @@ SynapticsPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
goto SetupProc_fail;
}
local->history_size = xf86SetIntOption(opts, "HistorySize", 0);
xf86ProcessCommonOptions(local, opts);
local->flags |= XI86_CONFIGURED;
......@@ -616,17 +620,25 @@ DeviceInit(DeviceIntPtr dev)
InitPointerDeviceStruct((DevicePtr)dev, map,
SYN_MAX_BUTTONS,
miPointerGetMotionEvents, SynapticsCtrl,
miPointerGetMotionBufferSize());
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
miPointerGetMotionEvents,
SynapticsCtrl,
miPointerGetMotionBufferSize()
#else
GetMotionHistory,
SynapticsCtrl,
GetMotionHistorySize(), 2
#endif
);
/* X valuator */
xf86InitValuatorAxisStruct(dev, 0, 0, -1, 1, 0, 1);
xf86InitValuatorDefaults(dev, 0);
/* Y valuator */
xf86InitValuatorAxisStruct(dev, 1, 0, -1, 1, 0, 1);
xf86InitValuatorDefaults(dev, 1);
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
xf86MotionHistoryAllocate(local);
#endif
if (!alloc_param_data(local))
return !Success;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment