Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ca5066f authored by Wenxin Feng's avatar Wenxin Feng
Browse files

Align the scroll ballistics with the pointing ballistics.

The scroll ballistics function is much faster than pointing, which
will make the scrolling feel less controllable than pointing. We
therefore use the same ballistic curves for both pointing and
scroll to provide a consistent touchpad interaction experience.

Bug: 278172968
Test: manuallly
Change-Id: I28c7b597cd86aec4d72dbdf76e3f1078e9c2c706
parent 1861463b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -245,6 +245,14 @@ std::list<NotifyArgs> TouchpadInputMapper::reconfigure(nsecs_t when,
        accelCurveProp.setRealValues(
                createAccelerationCurveForSensitivity(config.touchpadPointerSpeed,
                                                      accelCurveProp.getCount()));
        mPropertyProvider.getProperty("Use Custom Touchpad Scroll Accel Curve")
                .setBoolValues({true});
        GesturesProp scrollCurveProp = mPropertyProvider.getProperty("Scroll Accel Curve");
        scrollCurveProp.setRealValues(
                createAccelerationCurveForSensitivity(config.touchpadPointerSpeed,
                                                      scrollCurveProp.getCount()));
        mPropertyProvider.getProperty("Scroll X Out Scale").setRealValues({1.0});
        mPropertyProvider.getProperty("Scroll Y Out Scale").setRealValues({1.0});
        mPropertyProvider.getProperty("Invert Scrolling")
                .setBoolValues({config.touchpadNaturalScrollingEnabled});
        mPropertyProvider.getProperty("Tap Enable")