From 6d3749105d964da5b4e534206fdb47f5ff8a697f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 17 Aug 2017 13:10:31 +1000 Subject: [PATCH synaptics] Drop HandleTouches - it's a noop With the removal of touch events in 0a4cf80a00663, this function is a noop. It merely counted the number of touches but discarded the result. And UpdateTouchState does the update anyway. https://bugs.freedesktop.org/show_bug.cgi?id=102209 Signed-off-by: Peter Hutterer --- src/synaptics.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/synaptics.c b/src/synaptics.c index c7ba9ad..1df1ca7 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -2962,24 +2962,6 @@ UpdateTouchState(InputInfoPtr pInfo, struct SynapticsHwState *hw) } static void -HandleTouches(InputInfoPtr pInfo, struct SynapticsHwState *hw) -{ - SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private; - int new_active_touches = priv->num_active_touches; - int i; - - /* Count new number of active touches */ - for (i = 0; i < hw->num_mt_mask; i++) { - if (hw->slot_state[i] == SLOTSTATE_OPEN) - new_active_touches++; - else if (hw->slot_state[i] == SLOTSTATE_CLOSE) - new_active_touches--; - } - - UpdateTouchState(pInfo, hw); -} - -static void filter_jitter(SynapticsPrivate * priv, int *x, int *y) { SynapticsParameters *para = &priv->synpara; @@ -3175,7 +3157,7 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now, post_button_click(pInfo, 1); } - HandleTouches(pInfo, hw); + UpdateTouchState(pInfo, hw); /* Save old values of some state variables */ priv->finger_state = finger; -- 2.13.3