]> git.pld-linux.org Git - packages/xorg-driver-input-synaptics.git/blob - more-fingers.patch
a7d20d8ec838debf1d46fe8b3e78876ab40d201e
[packages/xorg-driver-input-synaptics.git] / more-fingers.patch
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
5  worked on mine XPS 14)
6
7 ---
8  conf/50-synaptics.conf |  4 +++-
9  src/eventcomm.c        | 13 +++++++++++--
10  src/synproto.h         |  2 ++
11  3 files changed, 16 insertions(+), 3 deletions(-)
12
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"
25  EndSection
26  
27  Section "InputClass"
28 diff --git a/src/eventcomm.c b/src/eventcomm.c
29 index d7de480..99fcc58 100644
30 --- a/src/eventcomm.c
31 +++ b/src/eventcomm.c
32 @@ -649,9 +649,12 @@ count_fingers(InputInfoPtr pInfo, const struct CommData *comm)
33          fingers = 2;
34      else if (comm->threeFingers)
35          fingers = 3;
36 -
37 +    else if (comm->fourFingers)
38 +       fingers=4;
39 +    else if (comm->fiveFingers)
40 +       fingers=5;
41      if (priv->has_touch && proto_data->num_touches > fingers)
42 -        fingers = proto_data->num_touches;
43 +       fingers = proto_data->num_touches;
44  
45      return fingers;
46  }
47 @@ -752,6 +755,12 @@ EventReadHwState(InputInfoPtr pInfo,
48              case BTN_TOOL_TRIPLETAP:
49                  comm->threeFingers = v;
50                  break;
51 +            case BTN_TOOL_QUADTAP:
52 +                comm->fourFingers = v;
53 +                break;
54 +            case BTN_TOOL_QUINTTAP:
55 +               comm->fiveFingers = v;
56 +               break;
57              case BTN_TOUCH:
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
62 --- a/src/synproto.h
63 +++ b/src/synproto.h
64 @@ -95,6 +95,8 @@ struct CommData {
65      Bool oneFinger;
66      Bool twoFingers;
67      Bool threeFingers;
68 +    Bool fourFingers;
69 +    Bool fiveFingers;
70  };
71  
72  struct _SynapticsParameters;
This page took 0.056678 seconds and 2 git commands to generate.