mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 14:00:06 +01:00
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:
parent
ff02bd1b5b
commit
2e8403e762
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue