From fb891dfada898d030cc7cedb9b818ad07a21b02a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 29 Jan 2016 16:25:31 +1000 Subject: [PATCH libinput] touchpad: drop motion hysteresis Some older touchpad devices jitter a fair bit when a finger is resting on the touchpad. That's why the hysteresis was introduced in the synaptics driver back in 2011. The default value of the hysteresis in the synaptics driver ended up being 0, even though the code looks like it's using a fraction of the touchpad diagonal. When the hysteresis code was ported to libinput it was eventually set to 0.5mm. Turns out this is still too high and tiny finger motions are either nonreactive or quite jumpy, making it hard to select small targets. Drop the hysteresis by reducing its margin to 0. I'm leaving the code in place for now because this will likely be needed for some devices. Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index f249116..757c7c7 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -1957,7 +1957,6 @@ tp_init(struct tp_dispatch *tp, { int width, height; double diagonal; - int res_x, res_y; tp->base.interface = &tp_interface; tp->device = device; @@ -1971,8 +1970,6 @@ tp_init(struct tp_dispatch *tp, if (tp_init_slots(tp, device) != 0) return -1; - res_x = tp->device->abs.absinfo_x->resolution; - res_y = tp->device->abs.absinfo_y->resolution; width = device->abs.dimensions.x; height = device->abs.dimensions.y; diagonal = sqrt(width*width + height*height); @@ -1981,8 +1978,8 @@ tp_init(struct tp_dispatch *tp, EV_ABS, ABS_MT_DISTANCE); - tp->hysteresis_margin.x = res_x/2; - tp->hysteresis_margin.y = res_y/2; + tp->hysteresis_margin.x = 0; + tp->hysteresis_margin.y = 0; if (tp_init_accel(tp, diagonal) != 0) return -1; -- 2.5.0