Add support for multiple pointer acceleration schemes. #8583
Available acceleration schemes: - xorg classic scheme. - the new "Predictable" polynomial accel scheme. X.Org Bug 8583 <http://bugs.freedesktop.org/show_bug.cgi?id=8583> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Peter Hutterer
parent
e7abe1676a
commit
c9eb0e870c
@@ -166,6 +166,13 @@ typedef struct _AxisInfo {
|
||||
int max_value;
|
||||
} AxisInfo, *AxisInfoPtr;
|
||||
|
||||
typedef struct _ValuatorAccelerationRec {
|
||||
int number;
|
||||
PointerAccelSchemeProc AccelSchemeProc;
|
||||
void *accelData; /* at disposal of AccelScheme */
|
||||
DeviceCallbackProc AccelCleanupProc;
|
||||
} ValuatorAccelerationRec, *ValuatorAccelerationPtr;
|
||||
|
||||
typedef struct _ValuatorClassRec {
|
||||
int numMotionEvents;
|
||||
int first_motion;
|
||||
@@ -177,8 +184,8 @@ typedef struct _ValuatorClassRec {
|
||||
AxisInfoPtr axes;
|
||||
unsigned short numAxes;
|
||||
int *axisVal; /* always absolute, but device-coord system */
|
||||
float dxremaind, dyremaind; /* for acceleration */
|
||||
CARD8 mode;
|
||||
ValuatorAccelerationRec accelScheme;
|
||||
} ValuatorClassRec, *ValuatorClassPtr;
|
||||
|
||||
typedef struct _ButtonClassRec {
|
||||
@@ -467,9 +474,12 @@ typedef struct _DeviceIntRec {
|
||||
/* last valuator values recorded, not posted to client;
|
||||
* for slave devices, valuators is in device coordinates
|
||||
* for master devices, valuators is in screen coordinates
|
||||
* see dix/getevents.c */
|
||||
* see dix/getevents.c
|
||||
* remainder supports acceleration
|
||||
*/
|
||||
struct {
|
||||
int valuators[MAX_VALUATORS];
|
||||
float remainder[MAX_VALUATORS];
|
||||
int numValuators;
|
||||
} last;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user