diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-05-23 11:51:53 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-05-23 12:01:37 +0930 |
commit | 6c9e9f8a40e20fb1761440acd2755f5fd31f4d44 (patch) | |
tree | 51093ef132aceaef19cfe43df0d42f9124b2157e /include | |
parent | fb146cbb0f28e4e480e5d16d61476ac46b5d00ce (diff) |
input: instead of lastx/y, use a last.valuators[] array on the device.
During GetPointerEvents (and others), we need to access the last coordinates
posted for this device from the driver (not as posted to the client!). Lastx/y
is ok if we only have two axes, but with more complex devices we also need to
transition between all other axes.
ABI break, recompile your input drivers.
Diffstat (limited to 'include')
-rw-r--r-- | include/input.h | 2 | ||||
-rw-r--r-- | include/inputstr.h | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/include/input.h b/include/input.h index 13902d77e..9b92ea33d 100644 --- a/include/input.h +++ b/include/input.h @@ -63,6 +63,8 @@ SOFTWARE. #define POINTER_ABSOLUTE (1 << 2) #define POINTER_ACCELERATE (1 << 3) +#define MAX_VALUATORS 36 /* XXX from comment in dix/getevents.c */ + #define NO_AXIS_LIMITS -1 #define MAP_LENGTH 256 diff --git a/include/inputstr.h b/include/inputstr.h index d117e554d..d1cc44801 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -420,8 +420,13 @@ typedef struct _DeviceIntRec { DeviceIntPtr master; /* master device */ DeviceIntPtr lastSlave; /* last slave device used */ } u; - int lastx, lasty; /* last event recorded, not posted to - * client; see dix/devices.c */ + + /* last valuator values recorded, not posted to client; + * see dix/getevents.c */ + struct { + int valuators[MAX_VALUATORS]; + int numValuators; + } last; } DeviceIntRec; typedef struct { |