From fde11d203229a97cd947b887060d8ebbea3439da Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sep 17 2014 21:53:18 +0000 Subject: synaptics 1.8.1 --- diff --git a/.gitignore b/.gitignore index 074ae43..aa82aa0 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ xf86-input-synaptics-20100823.tar.bz2 /xf86-input-synaptics-20140312.tar.bz2 /xf86-input-synaptics-20140318.tar.bz2 /xf86-input-synaptics-1.8.0.tar.bz2 +/xf86-input-synaptics-1.8.1.tar.bz2 diff --git a/0001-Include-xorg-server.h-to-fix-build-errors-on-newest-.patch b/0001-Include-xorg-server.h-to-fix-build-errors-on-newest-.patch deleted file mode 100644 index 9a8b784..0000000 --- a/0001-Include-xorg-server.h-to-fix-build-errors-on-newest-.patch +++ /dev/null @@ -1,67 +0,0 @@ -From e5863319b4603df115240cec30d72d9d689d0ff3 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 29 Aug 2014 07:57:41 +1000 -Subject: [PATCH synaptics] Include xorg-server.h to fix build errors on newest - glibc - -In file included from /usr/include/string.h:634:0, - from /usr/include/xorg/os.h:53, - from /usr/include/xorg/misc.h:115, - from /usr/include/xorg/xf86str.h:37, - from /usr/include/xorg/xf86Xinput.h:54, - from synproto.h:36, - from synproto.c:24: -/usr/include/xorg/os.h:579:1: error: expected identifier or '(' before '__extension__' - strndup(const char *str, size_t n); - -See http://lists.freedesktop.org/archives/xorg-devel/2014-July/043070.html - -Signed-off-by: Peter Hutterer ---- - src/eventcomm.h | 2 ++ - src/ps2comm.h | 2 ++ - src/synproto.h | 2 ++ - 3 files changed, 6 insertions(+) - -diff --git a/src/eventcomm.h b/src/eventcomm.h -index 4d759ff..79be7f0 100644 ---- a/src/eventcomm.h -+++ b/src/eventcomm.h -@@ -27,6 +27,8 @@ - #ifndef _EVENTCOMM_H_ - #define _EVENTCOMM_H_ - -+#include -+ - #include - #include - #include -diff --git a/src/ps2comm.h b/src/ps2comm.h -index 2be55e4..86794df 100644 ---- a/src/ps2comm.h -+++ b/src/ps2comm.h -@@ -22,6 +22,8 @@ - #ifndef _PS2COMM_H_ - #define _PS2COMM_H_ - -+#include -+ - #include - #include - #include "xf86_OSproc.h" -diff --git a/src/synproto.h b/src/synproto.h -index c52838c..cd89f74 100644 ---- a/src/synproto.h -+++ b/src/synproto.h -@@ -31,6 +31,8 @@ - #include "config.h" - #endif - -+#include -+ - #include - #include - #include --- -1.9.3 - diff --git a/0001-Limit-the-movement-to-20-mm-per-event.patch b/0001-Limit-the-movement-to-20-mm-per-event.patch deleted file mode 100644 index f33521e..0000000 --- a/0001-Limit-the-movement-to-20-mm-per-event.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 711e3d89ef167cd37d5e1966d9919e51da0aaefc Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 16 Sep 2014 08:52:56 +1000 -Subject: [PATCH synaptics] Limit the movement to 20 mm per event - -Touchpads are limited by a fixed sampling rate (usually 80Hz). Some finger -changes may happen too fast for this sampling rate, resulting in two distinct -event sequences: -* finger 1 up and finger 2 down in the same EV_SYN frame. Synaptics sees one - finger down before and after and the changed coordinates -* finger 1 up and finger 2 down _between_ two EV_SYN frames. Synaptics sees one - touchpoint move from f1 position to f2 position. - -That move causes a large cursor jump. The former could be solved (with -difficulty) by adding fake EV_SYN handling after releasing touchpoints but -that won't fix the latter case. - -So as a solution for now limit the finger movement to 20mm per event. -Tests on a T440 and an x220 showed that this is just above what a reasonable -finger movement would trigger. If a movement is greater than that limit, reset -it to 0/0. - -On devices without resolution, use 0.25 of the touchpad's diagonal instead. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -(cherry picked from commit 41b2312c006fca1f24e1a366174d3203a63fa04a) ---- - src/synaptics.c | 33 +++++++++++++++++++++++++++++++++ - src/synapticsstr.h | 2 ++ - 2 files changed, 35 insertions(+) - -diff --git a/src/synaptics.c b/src/synaptics.c -index b49957c..127c7e8 100644 ---- a/src/synaptics.c -+++ b/src/synaptics.c -@@ -770,6 +770,23 @@ set_default_parameters(InputInfoPtr pInfo) - pars->resolution_vert = - xf86SetIntOption(opts, "VertResolution", vertResolution); - -+ /* Touchpad sampling rate is too low to detect all movements. -+ A user may lift one finger and put another one down within the same -+ EV_SYN or even between samplings so the driver doesn't notice at all. -+ -+ We limit the movement to 20 mm within one event, that is more than -+ recordings showed is needed (17mm on a T440). -+ */ -+ if (pars->resolution_horiz > 1 && -+ pars->resolution_vert > 1) -+ pars->maxDeltaMM = 20; -+ else { -+ /* on devices without resolution set the vector length to 0.25 of -+ the touchpad diagonal */ -+ pars->maxDeltaMM = diag * 0.25; -+ } -+ -+ - /* Warn about (and fix) incorrectly configured TopEdge/BottomEdge parameters */ - if (pars->top_edge > pars->bottom_edge) { - int tmp = pars->top_edge; -@@ -2213,6 +2230,13 @@ get_delta(SynapticsPrivate *priv, const struct SynapticsHwState *hw, - *dy = integral; - } - -+/* Vector length, but not sqrt'ed, we only need it for comparison */ -+static inline double -+vlenpow2(double x, double y) -+{ -+ return x * x + y * y; -+} -+ - /** - * Compute relative motion ('deltas') including edge motion. - */ -@@ -2222,6 +2246,7 @@ ComputeDeltas(SynapticsPrivate * priv, const struct SynapticsHwState *hw, - { - enum MovingState moving_state; - double dx, dy; -+ double vlen; - int delay = 1000000000; - - dx = dy = 0; -@@ -2267,6 +2292,14 @@ ComputeDeltas(SynapticsPrivate * priv, const struct SynapticsHwState *hw, - out: - priv->prevFingers = hw->numFingers; - -+ vlen = vlenpow2(dx/priv->synpara.resolution_horiz, -+ dy/priv->synpara.resolution_vert); -+ -+ if (vlen > priv->synpara.maxDeltaMM * priv->synpara.maxDeltaMM) { -+ dx = 0; -+ dy = 0; -+ } -+ - *dxP = dx; - *dyP = dy; - -diff --git a/src/synapticsstr.h b/src/synapticsstr.h -index 4bd32ac..75f52d5 100644 ---- a/src/synapticsstr.h -+++ b/src/synapticsstr.h -@@ -226,6 +226,8 @@ typedef struct _SynapticsParameters { - int area_left_edge, area_right_edge, area_top_edge, area_bottom_edge; /* area coordinates absolute */ - int softbutton_areas[4][4]; /* soft button area coordinates, 0 => right, 1 => middle , 2 => secondary right, 3 => secondary middle button */ - int hyst_x, hyst_y; /* x and y width of hysteresis box */ -+ -+ int maxDeltaMM; /* maximum delta movement (vector length) in mm */ - } SynapticsParameters; - - struct _SynapticsPrivateRec { --- -1.9.3 - diff --git a/0001-conf-increase-top-software-button-area-to-15.patch b/0001-conf-increase-top-software-button-area-to-15.patch deleted file mode 100644 index 80bfc91..0000000 --- a/0001-conf-increase-top-software-button-area-to-15.patch +++ /dev/null @@ -1,40 +0,0 @@ -From e57b219a8c3b70433988f0b894a182cee0ef5736 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 6 Aug 2014 12:04:14 +1000 -Subject: [PATCH synaptics 1/2] conf: increase top software button area to 15% - -We had reports that the top software button area is hard to hit for those -using the trackpoint and clicking the buttons with their thumb. - -Analysis of event recordings (3 different people) for left, right and middle -clicks shows that there is a significant amount of events up to about 10mm -(with outliers up to 12mm) from the top of the touchpad. That maps to 15%. - -Interestingly, the middle button does not seem to need this, presumably the -haptic feedback of the little dots sticking out from the surface make hitting -the button easier. Its size is increased to 15% anyway, for simplicity and -because a sample set of 3 is too small to be definitive about this. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -(cherry picked from commit 730101223432f60397c61f74a5e6789b3ee34ecd) ---- - conf/50-synaptics.conf | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/conf/50-synaptics.conf b/conf/50-synaptics.conf -index a3145b8..aa50456 100644 ---- a/conf/50-synaptics.conf -+++ b/conf/50-synaptics.conf -@@ -33,7 +33,7 @@ Section "InputClass" - Identifier "Default clickpad buttons" - MatchDriver "synaptics" - Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0" -- Option "SecondarySoftButtonAreas" "58% 0 0 8% 42% 58% 0 8%" -+ Option "SecondarySoftButtonAreas" "58% 0 0 15% 42% 58% 0 15%" - EndSection - - # This option disables software buttons on Apple touchpads. --- -1.9.3 - diff --git a/0001-eventcomm-ensure-we-re-on-the-same-clock-as-the-serv.patch b/0001-eventcomm-ensure-we-re-on-the-same-clock-as-the-serv.patch deleted file mode 100644 index a677e88..0000000 --- a/0001-eventcomm-ensure-we-re-on-the-same-clock-as-the-serv.patch +++ /dev/null @@ -1,97 +0,0 @@ -From fa8f678d7eaa4f3986ecb4304857ec985ddec1cd 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 -Reviewed-by: Hans de Goede -(cherry picked from commit 90d19302306f49722e210227b2fb5161e6f51880) ---- - src/eventcomm.c | 13 +++++++++++-- - 1 file changed, 11 insertions(+), 2 deletions(-) - -diff --git a/src/eventcomm.c b/src/eventcomm.c -index 37de38a..36687fa 100644 ---- a/src/eventcomm.c -+++ b/src/eventcomm.c -@@ -39,6 +39,7 @@ - #include - #include - #include -+#include - #include "synproto.h" - #include "synapticsstr.h" - #include -@@ -88,6 +89,8 @@ struct eventcomm_proto_data { - - struct libevdev *evdev; - enum libevdev_read_flag read_flag; -+ -+ int have_monotonic_clock; - }; - - static void -@@ -217,6 +220,7 @@ EventDeviceOnHook(InputInfoPtr pInfo, SynapticsParameters * para) - SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private; - struct eventcomm_proto_data *proto_data = - (struct eventcomm_proto_data *) priv->proto_data; -+ int ret; - - set_libevdev_log_handler(); - -@@ -238,7 +242,6 @@ EventDeviceOnHook(InputInfoPtr pInfo, SynapticsParameters * para) - - if (para->grab_event_device) { - /* Try to grab the event device so that data don't leak to /dev/input/mice */ -- int ret; - - ret = libevdev_grab(proto_data->evdev, LIBEVDEV_GRAB); - if (ret < 0) { -@@ -250,6 +253,9 @@ EventDeviceOnHook(InputInfoPtr pInfo, SynapticsParameters * para) - - proto_data->need_grab = FALSE; - -+ ret = libevdev_set_clock_id(proto_data->evdev, CLOCK_MONOTONIC); -+ proto_data->have_monotonic_clock = (ret == 0); -+ - InitializeTouch(pInfo); - - return TRUE; -@@ -686,7 +692,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/0002-Prevent-two-finger-taps-from-being-ignored.patch b/0002-Prevent-two-finger-taps-from-being-ignored.patch deleted file mode 100644 index a9db22c..0000000 --- a/0002-Prevent-two-finger-taps-from-being-ignored.patch +++ /dev/null @@ -1,38 +0,0 @@ -From a028ceb894ca3959dd32d83bc8226b5b0b05f9df Mon Sep 17 00:00:00 2001 -From: Gabriele Mazzotta -Date: Sun, 27 Jul 2014 12:58:18 +0200 -Subject: [PATCH synaptics 2/2] Prevent two-finger taps from being ignored - -When two fingers are used, the coordinates of only one of them is taken into -account. This can lead to sudden variations of the absolute coordinates when -two-fingers taps are performed if the finger considered changes. - -Take into account coordinates variations to prevent unwanted taps only if -the number of fingers doesn't change. - -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -(cherry picked from commit 7d0ff39519e4d3760722b914883bee276035061c) ---- - src/synaptics.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/synaptics.c b/src/synaptics.c -index a8784f9..8a51754 100644 ---- a/src/synaptics.c -+++ b/src/synaptics.c -@@ -1945,8 +1945,9 @@ HandleTapProcessing(SynapticsPrivate * priv, struct SynapticsHwState *hw, - (priv->tap_max_fingers <= - ((priv->horiz_scroll_twofinger_on || - priv->vert_scroll_twofinger_on) ? 2 : 1)) && -- ((abs(hw->x - priv->touch_on.x) >= para->tap_move) || -- (abs(hw->y - priv->touch_on.y) >= para->tap_move))); -+ (priv->prevFingers == hw->numFingers && -+ ((abs(hw->x - priv->touch_on.x) >= para->tap_move) || -+ (abs(hw->y - priv->touch_on.y) >= para->tap_move)))); - press = (hw->left || hw->right || hw->middle); - - if (touch) { --- -1.9.3 - diff --git a/sources b/sources index bc68b25..be5b91b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -27a3f2b31606a13dd6b58d419978d64f xf86-input-synaptics-1.8.0.tar.bz2 +ed70d0cba94262a4008dcef654ab34a9 xf86-input-synaptics-1.8.1.tar.bz2 diff --git a/xorg-x11-drv-synaptics.spec b/xorg-x11-drv-synaptics.spec index 2822714..07cea70 100644 --- a/xorg-x11-drv-synaptics.spec +++ b/xorg-x11-drv-synaptics.spec @@ -7,8 +7,8 @@ Name: xorg-x11-drv-synaptics Summary: Xorg X11 Synaptics touchpad input driver -Version: 1.8.0 -Release: 9%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.8.1 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} URL: http://www.x.org License: MIT Group: User Interface/X Hardware Support @@ -23,12 +23,6 @@ Source0: ftp://ftp.x.org/pub/individual/driver/%{tarball}-%{version}.tar. Source3: 50-synaptics.conf Source4: 70-touchpad-quirks.rules -Patch01: 0001-conf-increase-top-software-button-area-to-15.patch -Patch02: 0002-Prevent-two-finger-taps-from-being-ignored.patch -Patch03: 0001-Include-xorg-server.h-to-fix-build-errors-on-newest-.patch -Patch04: 0001-eventcomm-ensure-we-re-on-the-same-clock-as-the-serv.patch -Patch05: 0001-Limit-the-movement-to-20-mm-per-event.patch - ExcludeArch: s390 s390x BuildRequires: git @@ -146,6 +140,9 @@ Development files for the Synaptics TouchPad for X.Org. %changelog +* Thu Sep 18 2014 Peter Hutterer 1.8.1-1 +- synaptics 1.8.1 + * Thu Sep 18 2014 Peter Hutterer 1.8.0-9 - Discard jumps of more than 20mm (#1130656)