dix: clean up accel old scheme data when switching schemes.

InitValuatorClassDeviceStruct always initializes with the default profile.
The default profile allocs data and adds a few properties which become
obsolete if the profile is changed lateron by the driver.

The property handlers are stored in the device's devPrivates and cleaned up.
Ideally, the property handler ID's could be stored somewhere more obvious,
but that seems to require breaking the ABI.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Simon Thum <simon.thum@gmx.de>
This commit is contained in:
Peter Hutterer 2009-11-18 14:39:25 +10:00
commit 0e6cee853d
3 changed files with 57 additions and 12 deletions

View file

@ -109,6 +109,9 @@ FreeVelocityData(DeviceVelocityPtr vel);
extern _X_INTERNAL BOOL
InitializePredictableAccelerationProperties(DeviceIntPtr dev);
extern _X_INTERNAL BOOL
DeletePredictableAccelerationProperties(DeviceIntPtr dev);
extern _X_EXPORT int
SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num);