touchpad: re-enable hysteresis by default for all devices
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 16 Jun 2016 06:11:56 +0000 (16:11 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Sun, 19 Jun 2016 23:23:58 +0000 (09:23 +1000)
The removal of the hysteresis even on precise touchpads has led to
difficulties controlling the cursor in a few instances. Since 27078b2667d
we only have the hysteresis on Apple touchpads and the Lenovo *40 series and
later. Even on those do we see some positioning difficulties (bug 94379).

So restore the hysteresis by default again for all touchpads. In the future a
knob could be exposed for precision vs reactivity or something, but for now
the drawback of imprecise positioning does not outweigh the benefits we get
on those few devices.

https://bugs.freedesktop.org/show_bug.cgi?id=94379

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
src/evdev-mt-touchpad.c
src/evdev.c
src/evdev.h
test/litest-device-synaptics-x1-carbon-3rd.c
udev/90-libinput-model-quirks.hwdb

index eb3c4dd..96e78b9 100644 (file)
@@ -2118,12 +2118,6 @@ tp_init_hysteresis(struct tp_dispatch *tp)
 {
        int res_x, res_y;
 
-       tp->hysteresis_margin.x = 0;
-       tp->hysteresis_margin.y = 0;
-
-       if (tp->device->model_flags & EVDEV_MODEL_PRECISE_TOUCHPAD)
-               return;
-
        res_x = tp->device->abs.absinfo_x->resolution;
        res_y = tp->device->abs.absinfo_y->resolution;
        tp->hysteresis_margin.x = res_x/2;
index e18492a..13e3578 100644 (file)
@@ -1804,7 +1804,6 @@ evdev_read_model_flags(struct evdev_device *device)
                MODEL(CYBORG_RAT),
                MODEL(CYAPA),
                MODEL(LENOVO_T450_TOUCHPAD),
-               MODEL(PRECISE_TOUCHPAD),
                MODEL(TRACKBALL),
                { NULL, EVDEV_MODEL_DEFAULT },
 #undef MODEL
index 99e3b73..eae9ba9 100644 (file)
@@ -114,7 +114,6 @@ enum evdev_device_model {
        EVDEV_MODEL_CYBORG_RAT = (1 << 14),
        EVDEV_MODEL_CYAPA = (1 << 15),
        EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17),
-       EVDEV_MODEL_PRECISE_TOUCHPAD = (1 << 18),
        EVDEV_MODEL_TRACKBALL = (1 << 19),
 };
 
index 9d4034d..23d9c5b 100644 (file)
@@ -121,7 +121,6 @@ static const char udev_rule[] =
 "\n"
 "ATTRS{name}==\"litest SynPS/2 Synaptics TouchPad X1C3rd\","
 "    ENV{LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD}=\"1\"\n"
-"    ENV{LIBINPUT_MODEL_PRECISE_TOUCHPAD}=\"1\"\n"
 "\n"
 "LABEL=\"touchpad_end\"";
 
index 821bc16..1571abc 100644 (file)
@@ -32,7 +32,6 @@ libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:800
 libinput:touchpad:input:b0003v05ACp*
 libinput:touchpad:input:b0005v05ACp*
  LIBINPUT_MODEL_APPLE_TOUCHPAD=1
- LIBINPUT_MODEL_PRECISE_TOUCHPAD=1
  LIBINPUT_ATTR_SIZE_HINT=104x75
 
 libinput:name:*Apple Inc. Apple Internal Keyboard*:dmi:*
@@ -103,7 +102,6 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??50*:
 libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??60*:
 libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd:*
  LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1
- LIBINPUT_MODEL_PRECISE_TOUCHPAD=1
 
 ##########################################
 # Logitech