xf86-input-synaptics:master: 7 commit(s)

Peter Hutterer whot at kemper.freedesktop.org
Tue Feb 25 21:05:10 PST 2014


Reporting from xf86-input-synaptics: xf86-input-synaptics driver

Please visit:
    http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics
Or get your own copy by using:
    git-clone git://anongit.freedesktop.org/xorg/driver/xf86-input-synaptics

7 commits against master at ac78616d...:
 man/synaptics.man  |    1 
 man/syndaemon.man  |    8 +-
 src/eventcomm.c    |   11 ++-
 src/properties.c   |    2 
 src/synaptics.c    |  189 ++++++++++++++++++++++++++++++++++++++---------------
 src/synapticsstr.h |    6 +
 tools/synclient.c  |    2 
 tools/syndaemon.c  |   33 +++++++--
 8 files changed, 186 insertions(+), 66 deletions(-)


commit bbe4c56c4998a90b478581a4d93717251d8e05be
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Fri Feb 21 10:31:44 2014 +0100

    Wait for *new* coordinates on a clickpad click before reporting the click
    
    It is possible for a click to get reported before any related touch events
    get reported, here is the relevant part of an evemu-record session on a T440s:
    
    E: 3.985585 0000 0000 0000	# ------------ SYN_REPORT (0) ----------
    E: 3.997419 0003 0039 -001	# EV_ABS / ABS_MT_TRACKING_ID   -1
    E: 3.997419 0001 014a 0000	# EV_KEY / BTN_TOUCH            0
    E: 3.997419 0003 0018 0000	# EV_ABS / ABS_PRESSURE         0
    E: 3.997419 0001 0145 0000	# EV_KEY / BTN_TOOL_FINGER      0
    E: 3.997419 0000 0000 0000	# ------------ SYN_REPORT (0) ----------
    E: 5.117881 0001 0110 0001	# EV_KEY / BTN_LEFT             1
    E: 5.117881 0000 0000 0000	# ------------ SYN_REPORT (0) ----------
    E: 5.133422 0003 0039 0187	# EV_ABS / ABS_MT_TRACKING_ID   187
    E: 5.133422 0003 0035 3098	# EV_ABS / ABS_MT_POSITION_X    3098
    E: 5.133422 0003 0036 3282	# EV_ABS / ABS_MT_POSITION_Y    3282
    E: 5.133422 0003 003a 0046	# EV_ABS / ABS_MT_PRESSURE      46
    E: 5.133422 0001 014a 0001	# EV_KEY / BTN_TOUCH            1
    E: 5.133422 0003 0000 3102	# EV_ABS / ABS_X                3102
    E: 5.133422 0003 0001 3282	# EV_ABS / ABS_Y                3282
    E: 5.133422 0003 0018 0046	# EV_ABS / ABS_PRESSURE         46
    E: 5.133422 0001 0145 0001	# EV_KEY / BTN_TOOL_FINGER      1
    E: 5.133422 0000 0000 0000	# ------------ SYN_REPORT (0) ----------
    
    Notice the BTN_LEFT event all by itself!
    
    If this happens, it may lead to the following problem scenario:
    -touch the touchpad in its right click area
    -let go of the touchpad
    -rapidly click in the middle area, so that BTN_LEFT gets reported before the
     new coordinates (such as seen in the trace above, this may require some
     practicing with evemu-record to reproduce)
    -the driver registers the click as a right click because it uses the
     old coordinates from the cumulative coordinates to determine the
     click location
    
    This commit fixes this by:
    1) Resetting the cumulative coordinates not only when no button is pressed,
       but also when there is no finger touching the touchpad, so that when
       we do get a touch the cumulative coordinates start at the right place
    2) Delaying processing the BTN_LEFT down transition if there is no finger
       touching the touchpad
    
    This approach has one downside, if we wrongly identify a touchpad as
    a clickpad, then the left button won't work unless the user touches the
    touchpad while clicking the left button.
    
    If we want we can fix this by doing something like this:
    1) Making update_hw_button_state return a delay; and
    2) Tracking that we've delayed BTN_LEFT down transition processing; and
    3) When we've delayed BTN_LEFT down transition return a small delay value; and
    4) If when we're called again we still don't have a finger down, just
       treat the click as a BTN_LEFT
    
    But this is not worth the trouble IMHO, the proper thing to do in this
    scenario is to fix the mis-identification of the touchpad as a clickpad.
    
    Signed-off-by: Hans de Goede <hdegoede at redhat.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diffstat:
    src/eventcomm.c |    5 +++--
    src/synaptics.c |    7 +++++++
    2 files changed, 10 insertions(+), 2 deletions(-)

cgit url:
http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/commit/?id=bbe4c56c


commit 743c45b9cfd057d00c37dab1cfca4b6202fb2642
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Fri Feb 21 10:31:43 2014 +0100

    On button down update cumulative to current x and y, instead of previous
    
    When a button click and new coordinates get reported in one go we sync the
    cumulative coordinates to the old x and y, rather then the newly reported ones.
    
    This keeping of the old coordinates causes the following issue:
    -touch the touchpad in its right click area
    -let go of the touchpad
    -rapidly click in the left click area (or middle area), so that the
     new location and the click get reported in one syn (may require some
     practicing with evemu-record to reproduce)
    -the driver registers the click as a right click because it uses the
     old coordinates from the cumulative coordinates to determine the
     click location
    
    Signed-off-by: Hans de Goede <hdegoede at redhat.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diffstat:
    src/eventcomm.c |    6 ++++++
    1 file changed, 6 insertions(+)

cgit url:
http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/commit/?id=bbe4c56c


commit 71652fe1f0800b081ba5602e9edda22a8d8d628e
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Fri Feb 21 10:31:42 2014 +0100

    Ignore motion the first X ms after a clickpad click
    
    This fixes my #1 anoyance with clickpads, where 2 out of 3 clicks turn into
    a click + drag unless I hold my finger really really still.
    
    Signed-off-by: Hans de Goede <hdegoede at redhat.com>
    
    Replaced property with a hardcoded 100ms. This is not something that we should
    expose as property, we should find a delay that works best and live with it.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diffstat:
    src/synaptics.c    |   12 ++++++++++++
    src/synapticsstr.h |    2 ++
    2 files changed, 14 insertions(+)

cgit url:
http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/commit/?id=bbe4c56c


commit 3adaf4623845dce54129b6474f4f8f2966f9bc47
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Fri Feb 21 10:31:41 2014 +0100

    Don't report motion inside soft-button areas
    
    Unless the motion has started outside the soft-button area.
    
    Note that we must start reporting motions regardless of whether we think we're
    in the button area or not as soon as we've switched to using cumulative
    coordinates, since then the coordinates are no longer absolute.
    
    This fixes the reporting of unintended motion just before a click in a soft
    button area which sometimes causes mis-clicks.
    
    Signed-off-by: Hans de Goede <hdegoede at redhat.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diffstat:
    src/synaptics.c    |   68 +++++++++++++++++++++++++++++++++++++++++++++++--
    src/synapticsstr.h |    1 
    2 files changed, 67 insertions(+), 2 deletions(-)

cgit url:
http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/commit/?id=bbe4c56c


commit effeee86c1c286cd09ab750efc4932790dd560dd
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Fri Feb 21 10:31:40 2014 +0100

    Get rid of old_hw_state
    
    We only use it to store button state which we already have in
    priv->lastButtons.
    
    While at it also properly indent the code block checking the various
    soft button areas.
    
    Signed-off-by: Hans de Goede <hdegoede at redhat.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diffstat:
    src/synaptics.c    |   58 +++++++++++++++++++------------------------------
    src/synapticsstr.h |    1 
    2 files changed, 23 insertions(+), 36 deletions(-)

cgit url:
http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/commit/?id=bbe4c56c


commit 840670508e0150ae11ae744c676253c7fba332dc
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Fri Feb 21 10:31:39 2014 +0100

    Add an enum for the different soft_button_areas
    
    While at it also move the enum for the soft button edges out of
    is_inside_button_area() so that it can be used elsewhere too.
    
    Signed-off-by: Hans de Goede <hdegoede at redhat.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diffstat:
    src/synaptics.c |   35 ++++++++++++++++++++++-------------
    1 file changed, 22 insertions(+), 13 deletions(-)

cgit url:
http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/commit/?id=bbe4c56c


commit eea73358760c7ff9c9dac061f265753637c6f25c
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Feb 21 10:31:37 2014 +0100

    Add another third state to TouchpadOff for disabling all but button clicks
    
    On a new set of laptops like the Lenovo T440 the trackstick does not have
    physical buttons. Instead, the touchpad's top edge is supposed to acts
    software button area. To avoid spurious cursor jumps when the trackstick is in
    use and the finger is resting on the touchpad, add another mode that disables
    motion events.
    
    Enabled by syndaemon with -t click-only, the default stays unchanged. No
    specific integration with the traditional disable-while-typing is needed. On
    such touchpads, disabling motion events is sufficient to avoid spurious
    events and we don't want to stop HW buttons to send events.
    
    Note that this only adds the new state to the driver and to syndaemon, there
    is nothing hooked up otherwise to actually monitor the trackstick.
    
    Special note for syndaemon: optional arguments are a GNU extension, so work
    around it by messing with an optstring starting with ":" which allows us to
    manually parse the options.
    
    Original version of this patch by John Pham <jhnphm at gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Hans de Goede <hdegoede at redhat.com>
    Signed-off-by: Hans de Goede <hdegoede at redhat.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diffstat:
    man/synaptics.man  |    1 +
    man/syndaemon.man  |    8 +++++---
    src/properties.c   |    2 +-
    src/synaptics.c    |   13 ++++++++++---
    src/synapticsstr.h |    2 ++
    tools/synclient.c  |    2 +-
    tools/syndaemon.c  |   33 ++++++++++++++++++++++++++-------
    7 files changed, 46 insertions(+), 15 deletions(-)

cgit url:
http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/commit/?id=bbe4c56c




More information about the xorg-commit mailing list