mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-27 21:22:26 +00:00
Replace some input devPrivates with regular struct fields
In the process, fixes a memory leak in CloseDevice, and an unchecked memory allocation in InitializePredictableAccelerationProperties. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
This commit is contained in:
parent
998e982b77
commit
65e961fcc1
6 changed files with 47 additions and 92 deletions
|
|
@ -514,8 +514,9 @@ typedef struct _DeviceIntRec {
|
|||
LedFeedbackPtr leds;
|
||||
struct _XkbInterest *xkb_interest;
|
||||
char *config_info; /* used by the hotplug layer */
|
||||
ClassesPtr unused_classes; /* for master devices */
|
||||
int saved_master_id; /* for slaves while grabbed */
|
||||
PrivateRec *devPrivates;
|
||||
int nPrivates;
|
||||
DeviceUnwrapProc unwrapProc;
|
||||
SpriteInfoPtr spriteInfo;
|
||||
union {
|
||||
|
|
|
|||
|
|
@ -62,6 +62,9 @@ typedef struct _MotionTracker {
|
|||
int dir; /* initial direction bitfield */
|
||||
} MotionTracker, *MotionTrackerPtr;
|
||||
|
||||
/* number of properties for predictable acceleration */
|
||||
#define NPROPS_PREDICTABLE_ACCEL 4
|
||||
|
||||
/**
|
||||
* Contains all data needed to implement mouse ballistics
|
||||
*/
|
||||
|
|
@ -88,9 +91,9 @@ typedef struct _DeviceVelocityRec {
|
|||
struct { /* to be able to query this information */
|
||||
int profile_number;
|
||||
} statistics;
|
||||
long prop_handlers[NPROPS_PREDICTABLE_ACCEL];
|
||||
} DeviceVelocityRec, *DeviceVelocityPtr;
|
||||
|
||||
|
||||
extern _X_EXPORT void
|
||||
InitVelocityData(DeviceVelocityPtr vel);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue