touchpad: Do not use fake touches when getting the average touches delta

Only look at real touches when getting the average touches delta, otherwise
the touch used to populate the fake touches gets an unfair weighing factor.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Hans de Goede 2015-02-17 11:40:57 +01:00
parent ff02bd1b5b
commit 2e8403e762

View file

@ -35,13 +35,15 @@ static void
tp_get_average_touches_delta(struct tp_dispatch *tp, double *dx, double *dy)
{
struct tp_touch *t;
int nchanged = 0;
unsigned int i, nchanged = 0;
double tmpx, tmpy;
*dx = 0.0;
*dy = 0.0;
tp_for_each_touch(tp, t) {
for (i = 0; i < tp->real_touches; i++) {
t = &tp->touches[i];
if (tp_touch_active(tp, t) && t->dirty) {
nchanged++;
tp_get_delta(t, &tmpx, &tmpy);