From: Orhan Kavrakoğlu <[email protected]>

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 <[email protected]>
---
 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
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to