1 From f8ae4568f86f0f4fec10e8678a70a189788b5c75 Mon Sep 17 00:00:00 2001
2 From: Felipe <fjfcavalcanti@gmail.com>
3 Date: Mon, 3 Feb 2014 16:43:44 -0300
4 Subject: [PATCH] Added 4 and 5 fingers support for more trackpads :) (It
8 conf/50-synaptics.conf | 4 +++-
9 src/eventcomm.c | 13 +++++++++++--
11 3 files changed, 16 insertions(+), 3 deletions(-)
13 diff --git a/conf/50-synaptics.conf b/conf/50-synaptics.conf
14 index aa50456..47ee3c8 100644
15 --- a/conf/50-synaptics.conf
16 +++ b/conf/50-synaptics.conf
17 @@ -14,7 +14,9 @@ Section "InputClass"
18 # This option is recommend on all Linux systems using evdev, but cannot be
19 # enabled by default. See the following link for details:
20 # http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
21 -# MatchDevicePath "/dev/input/event*"
22 + MatchDevicePath "/dev/input/event*"
23 + Option "Protocol" "event"
24 + Option "SHMConfig" "on"
28 diff --git a/src/eventcomm.c b/src/eventcomm.c
29 index d7de480..99fcc58 100644
32 @@ -649,9 +649,12 @@ count_fingers(InputInfoPtr pInfo, const struct CommData *comm)
34 else if (comm->threeFingers)
37 + else if (comm->fourFingers)
39 + else if (comm->fiveFingers)
41 if (priv->has_touch && proto_data->num_touches > fingers)
42 - fingers = proto_data->num_touches;
43 + fingers = proto_data->num_touches;
47 @@ -752,6 +755,12 @@ EventReadHwState(InputInfoPtr pInfo,
48 case BTN_TOOL_TRIPLETAP:
49 comm->threeFingers = v;
51 + case BTN_TOOL_QUADTAP:
52 + comm->fourFingers = v;
54 + case BTN_TOOL_QUINTTAP:
55 + comm->fiveFingers = v;
58 if (!priv->has_pressure)
59 hw->z = v ? para->finger_high + 1 : 0;
60 diff --git a/src/synproto.h b/src/synproto.h
61 index 6ba6740..8946d67 100644
64 @@ -95,6 +95,8 @@ struct CommData {
72 struct _SynapticsParameters;