From 4da9d51b67e8a7c6dfbb251c6739dc82e8d1fbf3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 18 Dec 2017 08:59:17 +1000 Subject: [PATCH] touchpad: remove duplicate if condition This was never true, we for the first part 3 lines above and return early. So if we get here, it's always false. commit aa87d2b25b88b added the new condition above, so since then this code was inactive and can be removed. https://bugs.freedesktop.org/show_bug.cgi?id=104279 Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 40220d6e..52df8fd2 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -1284,14 +1284,6 @@ tp_need_motion_history_reset(struct tp_dispatch *tp) if (tp->nfingers_down != tp->old_nfingers_down) return true; - /* if we're transitioning between slots and fake touches in either - * direction, we may get a coordinate jump - */ - if (tp->nfingers_down != tp->old_nfingers_down && - (tp->nfingers_down > tp->num_slots || - tp->old_nfingers_down > tp->num_slots)) - return true; - /* Quirk: if we had multiple events without x/y axis information, the next x/y event is going to be a jump. So we reset that touch to non-dirty effectively swallowing that event