~jderose/ubuntu/raring/xserver-xorg-input-synaptics/clickpad

« back to all changes in this revision

Viewing changes to debian/patches/114_jumpy_cursor_first_part.patch

  • Committer: Bazaar Package Importer
  • Author(s): Christopher James Halse Rogers, Cyril Brulebois, Christopher James Halse Rogers
  • Date: 2011-01-25 20:01:58 UTC
  • mfrom: (1.2.2 upstream) (2.1.4 experimental)
  • Revision ID: james.westby@ubuntu.com-20110125200158-9qpvmzuexogs7a5n
Tags: 1.3.99+git20110116.0e27ce3a-0ubuntu1
[ Cyril Brulebois ]
* Switch to Architecture: any, adding armhf support (Closes: #604672).

[ Christopher James Halse Rogers ]
* Merge from (unreleased) Debian experimental.  Remaining Ubuntu changes:
  - Split out our synaptics quirks into 51-synaptics-quirks.conf
  - Add the udev rule back for tagging specific machines to be quirked
  - Trigger udev in postinst to pick up udev rules
  - add Depend: on udev
  - 103_enable_cornertapping.patch: Enable right/middle clicks by
    tapping in the bottom- and top-right corners.
  - 104_always_enable_tapping.patch: Enable tapping regardless of the
    presence of physical buttons.
  - 106_always_enable_vert_edge_scroll.patch: Enable vertical edge
    tapping by default even if we enable two-finger scrolling as well.
  - 114_jumpy_cursor_first_part.patch: Adds a property to enable filtering
    jumpy cursor problems on some machines.
  - Specify ‘ubuntu’ branch in gbp.conf
  - 115_evdev_only.patch: Only bind to /dev/input/event* evdev devices
    (LP 624985)
* Update to git snapshot to fix build against Xserver 1.10 input API
* debian/patches/01-synaptics-dont-grab-if-not-on-current-VT.patch:
  - Refresh for new upstream.
* debian/patches/114_jumpy_cursor_first_part.patch:
  - Refresh for new upstream.  Drop the multi-touch chunk of the quirk,
    as that is handled by upstream commit a6ca4d25.
  

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff -Nurp xserver-xorg-input-synaptics.orig/include/synaptics-properties.h xserver-xorg-input-synaptics/include/synaptics-properties.h
2
 
--- xserver-xorg-input-synaptics.orig/include/synaptics-properties.h    2009-12-08 11:16:01.123175000 +0100
3
 
+++ xserver-xorg-input-synaptics/include/synaptics-properties.h 2009-12-08 11:20:59.551925185 +0100
 
1
Index: xserver-xorg-input-synaptics/include/synaptics-properties.h
 
2
===================================================================
 
3
--- xserver-xorg-input-synaptics.orig/include/synaptics-properties.h    2011-01-25 22:30:40.936826002 +1100
 
4
+++ xserver-xorg-input-synaptics/include/synaptics-properties.h 2011-01-25 22:30:48.686826002 +1100
4
5
@@ -155,4 +155,7 @@
5
6
 /* 32 bit, 4 values, left, right, top, bottom */
6
7
 #define SYNAPTICS_PROP_AREA "Synaptics Area"
9
10
+#define SYNAPTICS_PROP_JUMPYCURSOR_THRESHOLD "Synaptics Jumpy Cursor Threshold"
10
11
+
11
12
 #endif /* _SYNAPTICS_PROPERTIES_H_ */
12
 
diff -Nurp xserver-xorg-input-synaptics.orig/man/synaptics.man xserver-xorg-input-synaptics/man/synaptics.man
13
 
--- xserver-xorg-input-synaptics.orig/man/synaptics.man 2009-12-08 11:16:01.127175000 +0100
14
 
+++ xserver-xorg-input-synaptics/man/synaptics.man      2009-12-08 11:20:59.551925185 +0100
15
 
@@ -509,6 +509,14 @@ Ignore movements, scrolling and tapping 
16
 
 The option is disabled by default and can be enabled by setting the
17
 
 AreaBottomEdge option to any integer value other than zero. Property: "Synaptics Area"
 
13
Index: xserver-xorg-input-synaptics/man/synaptics.man
 
14
===================================================================
 
15
--- xserver-xorg-input-synaptics.orig/man/synaptics.man 2011-01-25 22:30:48.636826002 +1100
 
16
+++ xserver-xorg-input-synaptics/man/synaptics.man      2011-01-25 22:30:48.696826002 +1100
 
17
@@ -553,6 +553,14 @@
 
18
 A "touch" event happens when the Z value goes above FingerHigh, and an
 
19
 "untouch" event happens when the Z value goes below FingerLow.
18
20
 .
19
21
+.TP
20
22
+.BI "Option \*qJumpyCursorThreshold\*q \*q" integer \*q
25
27
+Jumpy Cursor Threshold"
26
28
+.
27
29
 .LP
28
 
 A tap event happens when the finger is touched and released in a time
29
 
 interval shorter than MaxTapTime, and the touch and release
30
 
@@ -870,6 +878,14 @@ right button, two-finger detection, thre
 
30
 The MaxDoubleTapTime parameter has the same function as the MaxTapTime
 
31
 parameter, but for the second, third, etc tap in a tap sequence.
 
32
@@ -900,6 +908,14 @@
31
33
 .BI "Synaptics Pad Resolution"
32
34
 32 bit unsigned, 2 values (read-only), vertical, horizontal in units/millimeter.
33
35
 
40
42
+32 bit, 1 value. 0 disables the property.
41
43
+
42
44
 .SH "NOTES"
43
 
 There is an example hal policy file in
44
 
 .I ${sourcecode}/fdi/11-x11-synaptics.fdi
45
 
diff -Nurp xserver-xorg-input-synaptics.orig/src/properties.c xserver-xorg-input-synaptics/src/properties.c
46
 
--- xserver-xorg-input-synaptics.orig/src/properties.c  2009-12-08 11:16:01.127175000 +0100
47
 
+++ xserver-xorg-input-synaptics/src/properties.c       2009-12-08 11:32:28.907425148 +0100
48
 
@@ -84,6 +84,7 @@ Atom prop_gestures              = 0;
 
45
 If either of
 
46
 .BI "Protocol \*q" auto-dev \*q
 
47
Index: xserver-xorg-input-synaptics/src/properties.c
 
48
===================================================================
 
49
--- xserver-xorg-input-synaptics.orig/src/properties.c  2011-01-25 22:30:40.926826002 +1100
 
50
+++ xserver-xorg-input-synaptics/src/properties.c       2011-01-25 22:31:42.536826002 +1100
 
51
@@ -82,6 +82,7 @@
49
52
 Atom prop_capabilities          = 0;
50
53
 Atom prop_resolution            = 0;
51
54
 Atom prop_area                  = 0;
53
56
 
54
57
 static Atom
55
58
 InitAtom(DeviceIntPtr dev, char *name, int format, int nvalues, int *values)
56
 
@@ -274,6 +275,8 @@ InitDeviceProperties(LocalDevicePtr loca
 
59
@@ -278,6 +279,8 @@
57
60
     values[2] = para->area_top_edge;
58
61
     values[3] = para->area_bottom_edge;
59
 
     prop_area = InitAtom(local->dev, SYNAPTICS_PROP_AREA, 32, 4, values);
 
62
     prop_area = InitAtom(pInfo->dev, SYNAPTICS_PROP_AREA, 32, 4, values);
60
63
+
61
 
+    prop_jumpycursor_threshold = InitAtom(local->dev, SYNAPTICS_PROP_JUMPYCURSOR_THRESHOLD, 32, 1, &para->jumpycursor_threshold);
 
64
+    prop_jumpycursor_threshold = InitAtom(pInfo->dev, SYNAPTICS_PROP_JUMPYCURSOR_THRESHOLD, 32, 1, &para->jumpycursor_threshold);
62
65
 }
63
66
 
64
67
 int
65
 
@@ -642,6 +645,12 @@ SetProperty(DeviceIntPtr dev, Atom prope
 
68
@@ -649,6 +652,12 @@
66
69
         para->area_right_edge  = area[1];
67
70
         para->area_top_edge    = area[2];
68
71
         para->area_bottom_edge = area[3];
75
78
     }
76
79
 
77
80
     return Success;
78
 
diff -Nurp xserver-xorg-input-synaptics.orig/src/synaptics.c xserver-xorg-input-synaptics/src/synaptics.c
79
 
--- xserver-xorg-input-synaptics.orig/src/synaptics.c   2009-12-08 11:20:15.851926000 +0100
80
 
+++ xserver-xorg-input-synaptics/src/synaptics.c        2009-12-08 11:38:38.156675531 +0100
81
 
@@ -132,6 +132,9 @@ static void ReadDevDimensions(LocalDevic
 
81
Index: xserver-xorg-input-synaptics/src/synaptics.c
 
82
===================================================================
 
83
--- xserver-xorg-input-synaptics.orig/src/synaptics.c   2011-01-25 22:30:48.676826002 +1100
 
84
+++ xserver-xorg-input-synaptics/src/synaptics.c        2011-01-25 22:30:48.696826002 +1100
 
85
@@ -131,6 +131,9 @@
82
86
 static void ScaleCoordinates(SynapticsPrivate *priv, struct SynapticsHwState *hw);
83
87
 static void CalculateScalingCoeffs(SynapticsPrivate *priv);
84
88
 
85
89
+int old_time_millis = 0;
86
90
+Bool was_time_skipped = FALSE;
87
91
+
88
 
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
89
 
 void InitDeviceProperties(LocalDevicePtr local);
 
92
 void InitDeviceProperties(InputInfoPtr pInfo);
90
93
 int SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
91
 
@@ -534,6 +537,7 @@ static void set_default_parameters(Local
 
94
                 BOOL checkonly);
 
95
@@ -584,6 +587,7 @@
92
96
     pars->tap_and_drag_gesture = xf86SetBoolOption(opts, "TapAndDragGesture", TRUE);
93
97
     pars->resolution_horiz = xf86SetIntOption(opts, "HorizResolution", horizResolution);
94
98
     pars->resolution_vert = xf86SetIntOption(opts, "VertResolution", vertResolution);
96
100
 
97
101
     /* Warn about (and fix) incorrectly configured TopEdge/BottomEdge parameters */
98
102
     if (pars->top_edge > pars->bottom_edge) {
99
 
@@ -1573,11 +1577,12 @@ HandleTapProcessing(SynapticsPrivate *pr
 
103
@@ -1696,11 +1700,12 @@
100
104
 #define HIST(a) (priv->move_hist[((priv->hist_index - (a) + SYNAPTICS_MOVE_HISTORY) % SYNAPTICS_MOVE_HISTORY)])
101
105
 
102
106
 static void
110
114
     priv->move_hist[idx].millis = millis;
111
115
     priv->hist_index = idx;
112
116
 }
113
 
@@ -1726,11 +1731,70 @@ ComputeDeltas(SynapticsPrivate *priv, st
114
 
        dy += hw->guest_dy;
 
117
@@ -1818,6 +1823,55 @@
 
118
     } else {                               /* reset packet counter */
 
119
        priv->count_packet_finger = 0;
115
120
     }
116
 
 
 
121
+
117
122
+    /* Handle quirks here */
118
123
+    if (dx || dy) {
119
 
+        /* Work around issues caused by two fingers on multi-touch
120
 
+         * models
121
 
+         */
122
 
+        if (priv->has_double) {
123
 
+            if ((hw->numFingers < 2) &&
124
 
+                ((HIST(0).num_fingers >= 2) || (HIST(1).num_fingers >= 2) ||
125
 
+                 (HIST(2).num_fingers >= 2) || (HIST(3).num_fingers >= 2) )) {
126
 
+                dx = dy = 0;
127
 
+            }
128
 
+            old_time_millis = hw->millis;
129
 
+        }
130
124
+        /* Work around issues caused by two fingers on single-touch
131
125
+         * models
132
126
+         */
133
 
+        else {
 
127
+        if (!priv->has_double) {
134
128
+            /* If para->jumpycursor_threshold <= 0, quirks are not
135
129
+             * available
136
130
+             */
173
167
+    }
174
168
+post_quirks:
175
169
+
 
170
     priv->prevFingers = hw->numFingers;
 
171
 
176
172
     *dxP = dx;
177
 
     *dyP = dy;
 
173
@@ -2496,7 +2550,7 @@
178
174
 
179
175
     /* generate a history of the absolute positions */
180
 
-    store_history(priv, hw->x, hw->y, hw->millis);
181
 
+    store_history(priv, hw->x, hw->y, hw->numFingers, hw->millis);
 
176
     if (inside_active_area)
 
177
-       store_history(priv, hw->x, hw->y, hw->millis);
 
178
+       store_history(priv, hw->x, hw->y, hw->numFingers, hw->millis);
182
179
 
183
180
     return delay;
184
181
 }
185
 
diff -Nurp xserver-xorg-input-synaptics.orig/src/synapticsstr.h xserver-xorg-input-synaptics/src/synapticsstr.h
186
 
--- xserver-xorg-input-synaptics.orig/src/synapticsstr.h        2009-12-08 11:16:01.127175000 +0100
187
 
+++ xserver-xorg-input-synaptics/src/synapticsstr.h     2009-12-08 11:29:47.238925256 +0100
188
 
@@ -33,6 +33,7 @@
 
182
Index: xserver-xorg-input-synaptics/src/synapticsstr.h
 
183
===================================================================
 
184
--- xserver-xorg-input-synaptics.orig/src/synapticsstr.h        2011-01-25 22:30:40.906826002 +1100
 
185
+++ xserver-xorg-input-synaptics/src/synapticsstr.h     2011-01-25 22:30:48.696826002 +1100
 
186
@@ -44,6 +44,7 @@
189
187
 typedef struct _SynapticsMoveHist
190
188
 {
191
189
     int x, y;
193
191
     int millis;
194
192
 } SynapticsMoveHistRec;
195
193
 
196
 
@@ -149,6 +150,7 @@ typedef struct _SynapticsParameters
 
194
@@ -160,6 +161,7 @@
197
195
     unsigned int resolution_horiz;          /* horizontal resolution of touchpad in units/mm */
198
196
     unsigned int resolution_vert;           /* vertical resolution of touchpad in units/mm */
199
197
     int area_left_edge, area_right_edge, area_top_edge, area_bottom_edge; /* area coordinates absolute */
201
199
 } SynapticsParameters;
202
200
 
203
201
 
204
 
diff -Nurp xserver-xorg-input-synaptics.orig/tools/synclient.c xserver-xorg-input-synaptics/tools/synclient.c
205
 
--- xserver-xorg-input-synaptics.orig/tools/synclient.c 2009-12-08 11:16:01.127175000 +0100
206
 
+++ xserver-xorg-input-synaptics/tools/synclient.c      2009-12-08 11:40:34.679925145 +0100
207
 
@@ -143,6 +143,7 @@ static struct Parameter params[] = {
 
202
Index: xserver-xorg-input-synaptics/tools/synclient.c
 
203
===================================================================
 
204
--- xserver-xorg-input-synaptics.orig/tools/synclient.c 2011-01-25 22:30:40.956826002 +1100
 
205
+++ xserver-xorg-input-synaptics/tools/synclient.c      2011-01-25 22:30:48.696826002 +1100
 
206
@@ -143,6 +143,7 @@
208
207
     {"AreaRightEdge",         PT_INT,    0, 10000, SYNAPTICS_PROP_AREA,        32,     1},
209
208
     {"AreaTopEdge",           PT_INT,    0, 10000, SYNAPTICS_PROP_AREA,        32,     2},
210
209
     {"AreaBottomEdge",        PT_INT,    0, 10000, SYNAPTICS_PROP_AREA,        32,     3},