diff --git a/SOURCES/0001-Always-count-tripletap-click-as-3-fingerclick-on-pad.patch b/SOURCES/0001-Always-count-tripletap-click-as-3-fingerclick-on-pad.patch new file mode 100644 index 0000000..132505e --- /dev/null +++ b/SOURCES/0001-Always-count-tripletap-click-as-3-fingerclick-on-pad.patch @@ -0,0 +1,48 @@ +From dd24bbe4bbffc5e711edd4ff81bd0fff668525a2 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Fri, 11 Apr 2014 20:41:36 +0200 +Subject: [PATCH synaptics] Always count tripletap + click as 3 fingerclick on + pads with < 3 touches + +When trying to do a 3 fingerclick on a touchpad which only tracks 2 touches, +this may register as a 3 or 2 fingerclick depending on the order in which +the touchpad detects the fingers. If the 2 outer fingers of the 3 get seen +first, then the 2 touches will be too far apart for the heuristic to see +them as being close together, and the click gets counted as a 2 finger click. + +A user will likely never do a 2 finger click with a 3th finger resting +somewhere else on the pad, where-as the above misdetection of the clicks is +a real issue, so simply always count a click with trippletap set as a +3 finger click on pads which track less then 3 touches. + +https://bugzilla.redhat.com/show_bug.cgi?id=1086218 + +Signed-off-by: Hans de Goede +Reviewed-by: Peter Hutterer +Signed-off-by: Peter Hutterer +(cherry picked from commit a6f0f4c9a5bcb0e25343dd4c59d4cc47cc5e8006) +--- + src/synaptics.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/synaptics.c b/src/synaptics.c +index 68705e7..f5f3251 100644 +--- a/src/synaptics.c ++++ b/src/synaptics.c +@@ -2591,6 +2591,13 @@ clickpad_guess_clickfingers(SynapticsPrivate * priv, + close_point >>= 1; + } + ++ /* Some trackpads touchpad only track two touchpoints but announce ++ * BTN_TOOL_TRIPLETAP (which sets hw->numFingers to 3), when this happens ++ * the user likely intents to do a 3 finger click, so handle it as such. ++ */ ++ if (hw->numFingers >= 3 && hw->num_mt_mask < 3) ++ nfingers = 3; ++ + return nfingers; + } + +-- +1.9.3 + diff --git a/SOURCES/0001-eventcomm-ensure-we-re-on-the-same-clock-as-the-serv.patch b/SOURCES/0001-eventcomm-ensure-we-re-on-the-same-clock-as-the-serv.patch new file mode 100644 index 0000000..cfdaab2 --- /dev/null +++ b/SOURCES/0001-eventcomm-ensure-we-re-on-the-same-clock-as-the-serv.patch @@ -0,0 +1,98 @@ +From 6174790eed24d45312fee9bf6e0b46aa2ee83c48 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 28 Aug 2014 14:13:38 +1000 +Subject: [PATCH synaptics] eventcomm: ensure we're on the same clock as the + server + +Default on evdev devices is CLOCK_REALTIME. If that clock falls behind the +server's CLOCK_MONOTONIC, motion after a clickpad click may be delayed by the +difference in the clocks. + +In detail: +When the timer func is triggered, GetTimeInMillis() which is CLOCK_MONOTONIC, +is stored as hwState->millis. The eventcomm backend uses struct +input_event time (CLOCK_REALTIME). + +When we read events from the device, if the evdev time is less than the server +time, the fix for (#48777) sets the current event time to hwState->millis. +Until the evdev time overtakes that stored time, all events have the +hwState->millis time. + +If during that time a clickpad triggers a physical click, +clickpad_click_millis is set to hwState->millis + the ignore-motion timeout. +Thus, all motion is ignored until the event time overtakes that stored +time. + +The whole issue is further enhanced by us unconditionally setting the timer +func if we get any events, which is a separate issue anyway. + +Signed-off-by: Peter Hutterer +(cherry-picked from commit 90d19302306f49722e210227b2fb5161e6f51880) + +(cherry picked from commit 7d958088a354d5a7969448f014f3620b59c7e4da) +--- + src/eventcomm.c | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) + +diff --git a/src/eventcomm.c b/src/eventcomm.c +index a66c6b0..2e45c2b 100644 +--- a/src/eventcomm.c ++++ b/src/eventcomm.c +@@ -39,6 +39,7 @@ + #include + #include + #include ++#include + #include "synproto.h" + #include "synapticsstr.h" + #include +@@ -80,6 +81,8 @@ struct eventcomm_proto_data { + ValuatorMask **last_mt_vals; + int num_touches; + int *tracking_ids; ++ ++ int have_monotonic_clock; + }; + + struct eventcomm_proto_data * +@@ -198,11 +201,11 @@ EventDeviceOnHook(InputInfoPtr pInfo, SynapticsParameters * para) + SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private; + struct eventcomm_proto_data *proto_data = + (struct eventcomm_proto_data *) priv->proto_data; ++ int clockid = CLOCK_MONOTONIC; ++ int ret; + + if (para->grab_event_device) { + /* Try to grab the event device so that data don't leak to /dev/input/mice */ +- int ret; +- + SYSCALL(ret = ioctl(pInfo->fd, EVIOCGRAB, (pointer) 1)); + if (ret < 0) { + xf86IDrvMsg(pInfo, X_WARNING, "can't grab event device, errno=%d\n", +@@ -213,6 +216,11 @@ EventDeviceOnHook(InputInfoPtr pInfo, SynapticsParameters * para) + + proto_data->need_grab = FALSE; + ++#ifdef EVIOCSCLOCKID ++ SYSCALL(ret = ioctl(pInfo->fd, EVIOCSCLOCKID, &clockid)); ++ proto_data->have_monotonic_clock = (ret == 0); ++#endif ++ + InitializeTouch(pInfo); + + return TRUE; +@@ -681,7 +689,10 @@ EventReadHwState(InputInfoPtr pInfo, + switch (ev.code) { + case SYN_REPORT: + hw->numFingers = count_fingers(pInfo, comm); +- hw->millis = 1000 * ev.time.tv_sec + ev.time.tv_usec / 1000; ++ if (proto_data->have_monotonic_clock) ++ hw->millis = 1000 * ev.time.tv_sec + ev.time.tv_usec / 1000; ++ else ++ hw->millis = GetTimeInMillis(); + SynapticsCopyHwState(hwRet, hw); + return TRUE; + } +-- +1.9.3 + diff --git a/SPECS/xorg-x11-drv-synaptics.spec b/SPECS/xorg-x11-drv-synaptics.spec index e8479da..7e841c1 100644 --- a/SPECS/xorg-x11-drv-synaptics.spec +++ b/SPECS/xorg-x11-drv-synaptics.spec @@ -8,7 +8,7 @@ Name: xorg-x11-drv-synaptics Summary: Xorg X11 Synaptics touchpad input driver Version: 1.7.1 -Release: 10%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}.1 +Release: 13%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} URL: http://www.x.org License: MIT Group: User Interface/X Hardware Support @@ -41,6 +41,10 @@ Patch14: 0011-Replace-is_inside_anybutton_area-with-current_button.patch Patch15: 0012-Don-t-allow-any-type-of-movement-starting-in-the-top.patch Patch16: 0013-If-the-touchpad-is-in-TOUCHPAD_OFF-mode-allow-physic.patch Patch17: 0014-Add-support-for-INPUT_PROP_TOPBUTTONPAD.patch +# Bug 1123297 - middle-click not supported by gesture on T440 +Patch18: 0001-Always-count-tripletap-click-as-3-fingerclick-on-pad.patch +# Bug 1138484 - Clickpad clicks are delayed when clocks drift apart +Patch19: 0001-eventcomm-ensure-we-re-on-the-same-clock-as-the-serv.patch ExcludeArch: s390 s390x @@ -115,6 +119,8 @@ Features: %patch15 -p1 %patch16 -p1 %patch17 -p1 +%patch18 -p1 +%patch19 -p1 %build autoreconf -v --install --force || exit 1 @@ -170,8 +176,14 @@ Development files for the Synaptics TouchPad for X.Org. %changelog -* Wed Jul 23 2014 Peter Hutterer 1.7.1-10.1 -- Add support for secondary software button areas (#1122130) +* Wed Sep 10 2014 Peter Hutterer 1.7.1-13 +- Avoid click delays when clocks drift apart (#1138484) + +* Thu Aug 14 2014 Peter Hutterer 1.7.1-12 +- Fix 3-finger click on clickpads (#1123297) + +* Thu Jul 17 2014 Peter Hutterer 1.7.1-11 +- Add support for secondary software button areas (#1093050) * Wed Jan 15 2014 Adam Jackson - 1.7.1-10 - 1.15 ABI rebuild