>From 6bdb4ab5abef8a2155df23281c4ca1268dc999ae Mon Sep 17 00:00:00 2001
From: Simon Thum <simon.thum@gmx.de>
Date: Tue, 5 Jan 2010 11:50:05 +0100
Subject: [PATCH 1/4] dix: rename input property for 'constant deceleration' to 'downscaling'

The old name seems not to be very descriptive, let alone correct.
Leaves the old define for any outsiders which may have used it, though
I'm unaware of any. The xorg.conf option is renamed likewise, but the old option
remains effective.
---
 Xi/xiproperty.c                |    2 +-
 dix/ptrveloc.c                 |    6 +++---
 hw/xfree86/common/xf86Xinput.c |    7 ++++---
 include/xserver-properties.h   |    4 +++-
 4 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index ea66c54..896d804 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -54,7 +54,7 @@ static struct dev_properties
     {0, XI_PROP_XTEST_DEVICE},
     {0, XATOM_FLOAT},
     {0, ACCEL_PROP_PROFILE_NUMBER},
-    {0, ACCEL_PROP_CONSTANT_DECELERATION},
+    {0, ACCEL_PROP_DOWNSCALING},
     {0, ACCEL_PROP_ADAPTIVE_DECELERATION},
     {0, ACCEL_PROP_VELOCITY_SCALING},
     {0, AXIS_LABEL_PROP},
diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index c2f4378..b15cbf0 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -197,7 +197,7 @@ AccelSetDecelProperty(DeviceIntPtr dev, Atom atom,
     int rc;
     int nelem = 1;
 
-    if (atom != XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION))
+    if (atom != XIGetKnownProperty(ACCEL_PROP_DOWNSCALING))
         return Success;
 
     vel = GetDevicePredictableAccelData(dev);
@@ -222,7 +222,7 @@ static long
 AccelInitDecelProperty(DeviceIntPtr dev, DeviceVelocityPtr vel)
 {
     float fval = 1.0/vel->const_acceleration;
-    Atom prop_const_decel = XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION);
+    Atom prop_const_decel = XIGetKnownProperty(ACCEL_PROP_DOWNSCALING);
     XIChangeDeviceProperty(dev, prop_const_decel,
                            XIGetKnownProperty(XATOM_FLOAT), 32,
                            PropModeReplace, 1, &fval, FALSE);
@@ -358,7 +358,7 @@ DeletePredictableAccelerationProperties(DeviceIntPtr dev)
     XIDeleteDeviceProperty(dev, prop, FALSE);
     prop = XIGetKnownProperty(ACCEL_PROP_ADAPTIVE_DECELERATION);
     XIDeleteDeviceProperty(dev, prop, FALSE);
-    prop = XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION);
+    prop = XIGetKnownProperty(ACCEL_PROP_DOWNSCALING);
     XIDeleteDeviceProperty(dev, prop, FALSE);
     prop = XIGetKnownProperty(ACCEL_PROP_PROFILE_NUMBER);
     XIDeleteDeviceProperty(dev, prop, FALSE);
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 57db056..979b265 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -121,10 +121,11 @@ ProcessVelocityConfiguration(DeviceIntPtr pDev, char* devname, pointer list,
 
     /* common settings (available via device properties) */
     tempf = xf86SetRealOption(list, "ConstantDeceleration", 1.0);
+    tempf = xf86SetRealOption(list, "Downscaling", tempf);
     if(tempf > 1.0){
-        xf86Msg(X_CONFIG, "%s: (accel) constant deceleration by %.1f\n",
+        xf86Msg(X_CONFIG, "%s: (accel) scaling down by %.1f\n",
                 devname, tempf);
-        prop = XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION);
+        prop = XIGetKnownProperty(ACCEL_PROP_DOWNSCALING);
         XIChangeDeviceProperty(pDev, prop, float_prop, 32,
                                PropModeReplace, 1, &tempf, FALSE);
     }
@@ -153,7 +154,7 @@ ProcessVelocityConfiguration(DeviceIntPtr pDev, char* devname, pointer list,
                 devname, tempi);
     }
 
-    /* set scaling */
+    /* set velocity scaling */
     tempf = xf86SetRealOption(list, "ExpectedRate", 0);
     prop = XIGetKnownProperty(ACCEL_PROP_VELOCITY_SCALING);
     if(tempf > 0){
diff --git a/include/xserver-properties.h b/include/xserver-properties.h
index 626d0ad..f90378d 100644
--- a/include/xserver-properties.h
+++ b/include/xserver-properties.h
@@ -39,7 +39,9 @@
 /* INTEGER of any format */
 #define ACCEL_PROP_PROFILE_NUMBER "Device Accel Profile"
 /* FLOAT, format 32 */
-#define ACCEL_PROP_CONSTANT_DECELERATION "Device Accel Constant Deceleration"
+#define ACCEL_PROP_DOWNSCALING "Device Downscaling"
+/* old define from X.org server 1.7 */
+#define ACCEL_PROP_CONSTANT_DECELERATION ACCEL_PROP_DOWNSCALING
 /* FLOAT, format 32 */
 #define ACCEL_PROP_ADAPTIVE_DECELERATION "Device Accel Adaptive Deceleration"
 /* FLOAT, format 32 */
-- 
1.6.4.4

