From 1a5adf208609c9dad6d7e9333e2e50bdd2386db9 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 02:50:44 +0000 Subject: import xorg-x11-drv-synaptics-1.9.0-1.el7 --- diff --git a/.gitignore b/.gitignore index f31200f..790db55 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/xf86-input-synaptics-1.8.2.tar.bz2 +SOURCES/xf86-input-synaptics-1.9.0.tar.bz2 diff --git a/.xorg-x11-drv-synaptics.metadata b/.xorg-x11-drv-synaptics.metadata index 7ccf913..b8a9c26 100644 --- a/.xorg-x11-drv-synaptics.metadata +++ b/.xorg-x11-drv-synaptics.metadata @@ -1 +1 @@ -e936bf70f576f086083d2a9a4a46b6b197411852 SOURCES/xf86-input-synaptics-1.8.2.tar.bz2 +1276abc68b7f47f9adf2e4f40439c95f1254a9fa SOURCES/xf86-input-synaptics-1.9.0.tar.bz2 diff --git a/SOURCES/0001-Limit-the-movement-to-20-mm-per-event.patch b/SOURCES/0001-Limit-the-movement-to-20-mm-per-event.patch deleted file mode 100644 index 07f7141..0000000 --- a/SOURCES/0001-Limit-the-movement-to-20-mm-per-event.patch +++ /dev/null @@ -1,113 +0,0 @@ -From f9155de44f1a94cccaca061231830b3c3e2277cd 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 08b90f4..4730777 100644 ---- a/src/synaptics.c -+++ b/src/synaptics.c -@@ -786,6 +786,23 @@ set_default_parameters(InputInfoPtr pInfo) - pars->resolution_vert = 1; - } - -+ /* 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; -@@ -2236,6 +2253,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. - */ -@@ -2245,6 +2269,7 @@ ComputeDeltas(SynapticsPrivate * priv, const struct SynapticsHwState *hw, - { - enum MovingState moving_state; - double dx, dy; -+ double vlen; - int delay = 1000000000; - - dx = dy = 0; -@@ -2290,6 +2315,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 e245c60..319fddc 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 { --- -2.1.0 - diff --git a/SOURCES/50-synaptics.conf b/SOURCES/50-synaptics.conf index c9fdfea..df8d336 100644 --- a/SOURCES/50-synaptics.conf +++ b/SOURCES/50-synaptics.conf @@ -12,7 +12,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. diff --git a/SPECS/xorg-x11-drv-synaptics.spec b/SPECS/xorg-x11-drv-synaptics.spec index 19191bf..fbe2a8d 100644 --- a/SPECS/xorg-x11-drv-synaptics.spec +++ b/SPECS/xorg-x11-drv-synaptics.spec @@ -7,7 +7,7 @@ Name: xorg-x11-drv-synaptics Summary: Xorg X11 Synaptics touchpad input driver -Version: 1.8.2 +Version: 1.9.0 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} URL: http://www.x.org License: MIT @@ -23,8 +23,6 @@ Source0: ftp://ftp.x.org/pub/individual/driver/%{tarball}-%{version}.tar. Source3: 50-synaptics.conf Source4: 70-touchpad-quirks.rules -Patch01: 0001-Limit-the-movement-to-20-mm-per-event.patch - ExcludeArch: s390 s390x BuildRequires: autoconf automake libtool pkgconfig @@ -82,7 +80,6 @@ Features: %prep %setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} -%patch01 -p1 %build autoreconf -v --install --force || exit 1 @@ -98,6 +95,9 @@ make install DESTDIR=$RPM_BUILD_ROOT # should be fixed in upstream Makefile.am or whatever. find $RPM_BUILD_ROOT -regex ".*\.la$" | xargs rm -f -- +# we keep shipping our own config file +rm -f $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d/70-synaptics.conf + install -d $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d/50-synaptics.conf @@ -138,6 +138,9 @@ Development files for the Synaptics TouchPad for X.Org. %changelog +* Fri Jan 27 2017 Peter Hutterer 1.9.0-1 +- synaptics 1.9.0 (#1401659) + * Fri May 01 2015 Peter Hutterer 1.8.2-1 - synaptics 1.8.2 (#1194883)