touchpad: restore the hysteresis by default
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 3 Jun 2016 01:19:23 +0000 (11:19 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Sun, 5 Jun 2016 23:00:14 +0000 (09:00 +1000)
A large part of the bugs seen right now are related to touchpads jittering too
much. Fixing them one by one is entertaining, but time consuming. Right now
the number of touchpads that require a hysteresis seem to outnumber those that
don't, so switch the approach around: leave the hysteresis in place but
disable it for those touchpads that don't need it.

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 a7b7a68..724de7f 100644 (file)
@@ -2076,27 +2076,17 @@ tp_init_hysteresis(struct tp_dispatch *tp)
 {
        int res_x, res_y;
 
-       if (tp->device->model_flags & EVDEV_MODEL_CYAPA)
-               goto want_hysteresis;
-
-       if (tp->semi_mt &&
-           (tp->device->model_flags & EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD))
-               goto want_hysteresis;
-
-       if (tp->device->model_flags & EVDEV_MODEL_WOBBLY_TOUCHPAD)
-               goto want_hysteresis;
-
        tp->hysteresis_margin.x = 0;
        tp->hysteresis_margin.y = 0;
 
-       return;
+       if (tp->device->model_flags & EVDEV_MODEL_PRECISE_TOUCHPAD)
+               return;
 
-want_hysteresis:
        res_x = tp->device->abs.absinfo_x->resolution;
        res_y = tp->device->abs.absinfo_y->resolution;
-
        tp->hysteresis_margin.x = res_x/2;
        tp->hysteresis_margin.y = res_y/2;
+
        return;
 }
 
index cfb4a91..0227f51 100644 (file)
@@ -1806,7 +1806,7 @@ evdev_read_model_flags(struct evdev_device *device)
                MODEL(CYBORG_RAT),
                MODEL(CYAPA),
                MODEL(LENOVO_T450_TOUCHPAD),
-               MODEL(WOBBLY_TOUCHPAD),
+               MODEL(PRECISE_TOUCHPAD),
                MODEL(TRACKBALL),
                { NULL, EVDEV_MODEL_DEFAULT },
 #undef MODEL
index 4fe2cb9..54d7ce7 100644 (file)
@@ -114,7 +114,7 @@ enum evdev_device_model {
        EVDEV_MODEL_CYBORG_RAT = (1 << 14),
        EVDEV_MODEL_CYAPA = (1 << 15),
        EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17),
-       EVDEV_MODEL_WOBBLY_TOUCHPAD = (1 << 18),
+       EVDEV_MODEL_PRECISE_TOUCHPAD = (1 << 18),
        EVDEV_MODEL_TRACKBALL = (1 << 19),
 };
 
index 23d9c5b..9d4034d 100644 (file)
@@ -121,6 +121,7 @@ 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 a50fa3d..821bc16 100644 (file)
@@ -26,18 +26,13 @@ libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:800
 libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:800
  LIBINPUT_ATTR_SIZE_HINT=100x55
 
-libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:300
-libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:300
-libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:310
-libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:310
- LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1
-
 ##########################################
 # Apple
 ##########################################
 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:*
@@ -83,14 +78,6 @@ libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*
  LIBINPUT_MODEL_CYAPA=1
 
 ##########################################
-# HP
-##########################################
-
-# HP 14-ac157tu
-libinput:name:*ETPS/2 Elantech Touchpad*:dmi:*svnHP*pvrCNB1:*
- LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1
-
-##########################################
 # LENOVO
 ##########################################
 
@@ -116,10 +103,7 @@ 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
-
-# Lenovo Yoga 2013
-libinput:name:*SynPS/2 Synaptics TouchPad*:dmi:*svnLENOVO*pvrLenovoYoga213:*
- LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1
+ LIBINPUT_MODEL_PRECISE_TOUCHPAD=1
 
 ##########################################
 # Logitech