<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Fix acceleration curve for touchpads"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=90942">90942</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Fix acceleration curve for touchpads
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Wayland
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>libinput
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>wayland-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>lisec.velimir@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Acceleration curve used for mouse is also used on touchpads. Because of this
touchpads are not very precise. They're too fast. I've been playing around with
different acceleration curves for touchpads and this is what I've come up with:

touchpad_accel_profile_linear(struct motion_filter *filter,
                              void *data,
                              double speed_in,
                              uint64_t time)
{
    const double TP_MAGIC_SLOWDOWN = 0.4;
    double speed_out;

    speed_in *= TP_MAGIC_SLOWDOWN;

    struct pointer_accelerator *accel_filter =
        (struct pointer_accelerator *)filter;

    double s1, s2;
    const double max_accel = accel_filter->accel; /* unitless factor */
    const double threshold = accel_filter->threshold; /* units/ms */
    const double incline = accel_filter->incline;

    s1 = min(0.55, 0.35 + speed_in);
    s2 = speed_in + 0.15;

    speed_out = min(max_accel, s2 > 0.55 ? s2 : s1);

    return speed_out * TP_MAGIC_SLOWDOWN;
}

I personally quite like this curve and speed, but that's probably because I use
similar curve and speed in X11 so I'm used to it.

The thing that's missing is treshold and incline variables. Currently I can't
incorporate those into the formula because i don't know how to change mouse
speed. I'm running ubuntu 14.04 and I'm testing libinput in weston. Is there a
way to change mouse speed from weston.ini?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>