[xorg-x11-drv-synaptics/f20] Fix 3 finger clicking on clickpads (#1086218)
Hans de Goede
jwrdegoede at fedoraproject.org
Mon Apr 14 13:16:16 UTC 2014
commit ccb6303d7759e9fddbe933421f17b09c0cdd26ec
Author: Hans de Goede <hdegoede at redhat.com>
Date: Mon Apr 14 15:16:02 2014 +0200
Fix 3 finger clicking on clickpads (#1086218)
- Add T431 to 70-touchpad-quirks.rules as touchpad_softbutton_top (#1085582)
- Switch to using relative coordinates for the top softbutton area (#1085697)
...t-tripletap-click-as-3-fingerclick-on-pad.patch | 17 +++++
50-synaptics.conf | 68 ++------------------
70-touchpad-quirks.rules | 15 ++--
xorg-x11-drv-synaptics.spec | 18 +++---
4 files changed, 41 insertions(+), 77 deletions(-)
---
diff --git a/0001-Always-count-tripletap-click-as-3-fingerclick-on-pad.patch b/0001-Always-count-tripletap-click-as-3-fingerclick-on-pad.patch
new file mode 100644
index 0000000..4b9c795
--- /dev/null
+++ b/0001-Always-count-tripletap-click-as-3-fingerclick-on-pad.patch
@@ -0,0 +1,17 @@
+diff -up xf86-input-synaptics-1.7.4/src/synaptics.c.orig xf86-input-synaptics-1.7.4/src/synaptics.c
+--- xf86-input-synaptics-1.7.4/src/synaptics.c.orig 2014-04-11 21:26:55.308988916 +0200
++++ xf86-input-synaptics-1.7.4/src/synaptics.c 2014-04-11 21:28:41.349076981 +0200
+@@ -2657,6 +2657,13 @@ clickpad_guess_clickfingers(SynapticsPri
+ 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;
+ }
+
diff --git a/50-synaptics.conf b/50-synaptics.conf
index 81784c1..b784593 100644
--- a/50-synaptics.conf
+++ b/50-synaptics.conf
@@ -39,6 +39,10 @@ EndSection
# get flaky button behaviour.
# https://bugs.freedesktop.org/show_bug.cgi?id=70819
# https://bugs.freedesktop.org/show_bug.cgi?id=76341
+#
+# This really is a kernel issue, as the kernel should simply not report these
+# as clickpads. This has been fixed in 3.13.9 and later, this section
+# should be removed in the future
Section "InputClass"
Identifier "Disable clickpad for CyPS/2 Cypress Trackpad"
MatchProduct "CyPS/2 Cypress Trackpad"
@@ -62,70 +66,12 @@ EndSection
# Some devices have the buttons on the top of the touchpad. For those, set
# the secondary button area to exactly that.
# Affected: Lenovo T440, T540, X240, Helix, Yoga
+#
+# Note the touchpad_softbutton_top tag is a temporary solution, we're working
+# on a more permanent solution upstream (likely adding INPUT_PROP_TOPBUTTONPAD)
Section "InputClass"
Identifier "Lenovo TrackPoint top software buttons"
MatchDriver "synaptics"
MatchTag "touchpad_softbutton_top"
Option "SecondarySoftButtonAreas" "58% 0 0 8% 42% 58% 0 8%"
EndSection
-
-# FIXME: This config below requires a kernel fix to expose the device's PnPID
-# correctly https://lkml.org/lkml/2014/2/23/63, and an Xserver fix to
-# actually find that PNPID. So for now, manually configure them with udev
-# rule hacks.
-#
-# WARNING: these devices are affected by a firmware bug that
-# provides us with wrong min/max ranges. So we can't use percentages
-# here and instead hardcode some range that seems sensible for now.
-# Do not copy this into your custom file, wait for the kernel to be
-# fixed and use percentages
-#
-# FTR: this is how it should look like:
-#Section "InputClass"
-# Identifier "Lenovo TrackPoint top software buttons"
-# MatchDriver "synaptics"
-# MatchPnPID "LEN0033*|LEN0034*|LEN0035*|LEN0036*|LEN0042*"
-# Option "SecondarySoftButtonAreas" "58% 0 0 8% 42% 58% 0 8%"
-#EndSection
-
-Section "InputClass"
- Identifier "Lenovo Helix trackstick software button buttons"
- MatchTag "Helix"
- Option "SecondarySoftButtonAreas" "3360 0 0 2464 2716 3359 0 2464"
-EndSection
-
-Section "InputClass"
- Identifier "Lenovo T540 trackstick software button buttons"
- MatchTag "T540"
- Option "SecondarySoftButtonAreas" "3363 0 0 2280 2717 3362 0 2280"
-EndSection
-
-Section "InputClass"
- Identifier "Lenovo X240 trackstick software button buttons"
- MatchTag "X240"
- Option "SecondarySoftButtonAreas" "3835 0 0 1439 3116 3834 0 1439"
-EndSection
-
-Section "InputClass"
- Identifier "Lenovo T440 trackstick software button buttons"
- MatchTag "T440"
- Option "SecondarySoftButtonAreas" "3395 0 0 2248 2741 3394 0 2248"
-EndSection
-
-Section "InputClass"
- Identifier "Lenovo Yoga trackstick software button buttons"
- MatchTag "Yoga"
- Option "SecondarySoftButtonAreas" "3835 0 0 1439 3116 3834 0 1439"
-EndSection
-
-Section "InputClass"
- Identifier "Lenovo L440 trackstick software button buttons"
- MatchTag "L440"
- Option "SecondarySoftButtonAreas" "3835 0 0 1439 3116 3834 0 1439"
-EndSection
-
-Section "InputClass"
- Identifier "Lenovo X1 Carbon trackstick software button buttons"
- MatchTag "X1C"
- Option "SecondarySoftButtonAreas" "3363 0 0 2280 2717 3362 0 2280"
-EndSection
diff --git a/70-touchpad-quirks.rules b/70-touchpad-quirks.rules
index 3da28f9..b5cbfd3 100644
--- a/70-touchpad-quirks.rules
+++ b/70-touchpad-quirks.rules
@@ -12,12 +12,13 @@ ENV{ID_INPUT_TOUCHPAD}!="1", GOTO="touchpad_quirks_end"
ATTR{[dmi/id]product_name}=="Inspiron 1011|Inspiron 1012", \
ENV{ID_INPUT.tags}="touchpad_button_overlap"
-ATTR{[dmi/id]product_version}=="*T440*", ENV{ID_INPUT.tags}="T440"
-ATTR{[dmi/id]product_version}=="*L440*", ENV{ID_INPUT.tags}="L440"
-ATTR{[dmi/id]product_version}=="*T540*", ENV{ID_INPUT.tags}="T540"
-ATTR{[dmi/id]product_version}=="*X240*", ENV{ID_INPUT.tags}="X240"
-ATTR{[dmi/id]product_version}=="*Helix*" ENV{ID_INPUT.tags}="X240"
-ATTR{[dmi/id]product_version}=="*Yoga*", ENV{ID_INPUT.tags}="Yoga"
-ATTR{[dmi/id]product_version}=="*X1 Carbon 2nd*", ENV{ID_INPUT.tags}="X1C"
+ATTR{[dmi/id]product_version}=="ThinkPad X240*", ENV{ID_INPUT.tags}="touchpad_softbutton_top"
+ATTR{[dmi/id]product_version}=="ThinkPad T431*", ENV{ID_INPUT.tags}="touchpad_softbutton_top"
+ATTR{[dmi/id]product_version}=="ThinkPad T440*", ENV{ID_INPUT.tags}="touchpad_softbutton_top"
+ATTR{[dmi/id]product_version}=="ThinkPad L440*", ENV{ID_INPUT.tags}="touchpad_softbutton_top"
+ATTR{[dmi/id]product_version}=="ThinkPad T540*", ENV{ID_INPUT.tags}="touchpad_softbutton_top"
+ATTR{[dmi/id]product_version}=="ThinkPad Helix*" ENV{ID_INPUT.tags}="touchpad_softbutton_top"
+ATTR{[dmi/id]product_version}=="ThinkPad S1 Yoga", ENV{ID_INPUT.tags}="touchpad_softbutton_top"
+ATTR{[dmi/id]product_version}=="ThinkPad X1 Carbon 2nd*", ENV{ID_INPUT.tags}="touchpad_softbutton_top"
LABEL="touchpad_quirks_end"
diff --git a/xorg-x11-drv-synaptics.spec b/xorg-x11-drv-synaptics.spec
index 700b52a..eb40d8f 100644
--- a/xorg-x11-drv-synaptics.spec
+++ b/xorg-x11-drv-synaptics.spec
@@ -8,7 +8,7 @@
Name: xorg-x11-drv-synaptics
Summary: Xorg X11 Synaptics touchpad input driver
Version: 1.7.4
-Release: 6%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
+Release: 7%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X Hardware Support
@@ -36,6 +36,7 @@ Patch009: 0009-Add-property-support-for-secondary-top-software-butt.patch
Patch010: 0010-Replace-is_inside_anybutton_area-with-current_button.patch
Patch011: 0011-Don-t-allow-any-type-of-movement-starting-in-the-top.patch
Patch012: 0001-If-the-touchpad-is-in-TOUCHPAD_OFF-mode-allow-physic.patch
+Patch013: 0001-Always-count-tripletap-click-as-3-fingerclick-on-pad.patch
ExcludeArch: s390 s390x
@@ -107,6 +108,7 @@ Features:
%patch010 -p1
%patch011 -p1
%patch012 -p1
+%patch013 -p1
%build
autoreconf -v --install --force || exit 1
@@ -114,9 +116,7 @@ autoreconf -v --install --force || exit 1
make %{?_smp_mflags}
%install
-rm -rf $RPM_BUILD_ROOT
-
-make install DESTDIR=$RPM_BUILD_ROOT
+%make_install
# FIXME: Remove all libtool archives (*.la) from modules directory. This
# should be fixed in upstream Makefile.am or whatever.
@@ -129,11 +129,7 @@ install -d $RPM_BUILD_ROOT%{_prefix}/lib/udev/rules.d/
install -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_prefix}/lib/udev/rules.d/70-touchpad-quirks.rules
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%files
-%defattr(-,root,root,-)
%doc COPYING
%{_datadir}/X11/xorg.conf.d/50-synaptics.conf
%{driverdir}/synaptics_drv.so
@@ -154,7 +150,6 @@ Requires: pkgconfig
Development files for the Synaptics TouchPad for X.Org.
%files devel
-%defattr(-,root,root,-)
%doc COPYING
%{_libdir}/pkgconfig/xorg-synaptics.pc
%dir %{_includedir}/xorg
@@ -162,6 +157,11 @@ Development files for the Synaptics TouchPad for X.Org.
%changelog
+* Mon Apr 14 2014 Hans de Goede <hdegoede at redhat.com> 1.7.4-7
+- Fix 3 finger clicking on clickpads (#1086218)
+- Add T431 to 70-touchpad-quirks.rules as touchpad_softbutton_top (#1085582)
+- Switch to using relative coordinates for the top softbutton area (#1085697)
+
* Wed Apr 09 2014 Peter Hutterer <peter.hutterer at redhat.com> 1.7.4-6
- Add L440 and X1 Carbon tags/config
More information about the scm-commits
mailing list