[PATCH dix] dix: Added a "flat" acceleration profile that provides a linear pointer response.
Orhan Kavrakoglu
orhan at tart.com.tr
Mon Mar 28 11:34:26 PDT 2011
From: Orhan Kavrakoğlu <aibok42 at gmail.com>
This profile disables pointer acceleration in the conventional sense
yet still allows one to adjust sensitivity using the "acceleration"
control.
Signed-off-by: Orhan Kavrakoğlu <aibok42 at gmail.com>
---
dix/ptrveloc.c | 13 +++++++++++++
include/ptrveloc.h | 3 ++-
2 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index ccd445e..2349c11 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -953,6 +953,17 @@ NoProfile(
return 1.0f;
}
+static float
+FlatProfile(
+ DeviceIntPtr dev,
+ DeviceVelocityPtr vel,
+ float velocity,
+ float threshold,
+ float acc)
+{
+ return acc;
+}
+
static PointerAccelerationProfileFunc
GetAccelerationProfile(
DeviceVelocityPtr vel,
@@ -977,6 +988,8 @@ GetAccelerationProfile(
return SmoothLimitedProfile;
case AccelProfileNone:
return NoProfile;
+ case AccelProfileFlat:
+ return FlatProfile;
default:
return NULL;
}
diff --git a/include/ptrveloc.h b/include/ptrveloc.h
index c14e12d..151dcf2 100644
--- a/include/ptrveloc.h
+++ b/include/ptrveloc.h
@@ -38,7 +38,8 @@
#define AccelProfilePower 5
#define AccelProfileLinear 6
#define AccelProfileSmoothLimited 7
-#define AccelProfileLAST AccelProfileSmoothLimited
+#define AccelProfileFlat 8
+#define AccelProfileLAST AccelProfileFlat
/* fwd */
struct _DeviceVelocityRec;
--
1.7.1
More information about the xorg-devel
mailing list