summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErkin Bahceci <erkinbah@gmail.com>2009-05-11 12:32:32 -0500
committerPeter Hutterer <peter.hutterer@who-t.net>2009-05-13 09:03:46 +1000
commitee265e10c9cc724ad0badcab86a3893667717322 (patch)
treebf46224fce9a107dda3834236a5a6bfa486f4d32
parente4b1571d487cb67bab64e1ee890bddcd02437ddf (diff)
Add TapAndDragGesture option and gestures property.
The tap-and-drag gesture is an alternative way of dragging. It is performed by tapping (touching and releasing the finger), then touching again and moving the finger on the touchpad. This gesture is enabled by default and can be disabled by setting the TapAndDragGesture option to false. The gesture already existed in synaptics and was always enabled. This commit adds an option to switch it on/off. The default behavior is tap-and-drag being enabled, that is, TapAndDragGesture is true. The "Synaptics Gestures" property is intended to hold all new gesture enabling options, like options for the upcoming multitouch gestures. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--docs/tapndrag.dia164
-rw-r--r--include/synaptics-properties.h3
-rw-r--r--man/synaptics.man20
-rw-r--r--src/properties.c12
-rw-r--r--src/synaptics.c28
-rw-r--r--src/synapticsstr.h1
-rw-r--r--tools/synclient.c1
7 files changed, 169 insertions, 60 deletions
diff --git a/docs/tapndrag.dia b/docs/tapndrag.dia
index a411572..13c6108 100644
--- a/docs/tapndrag.dia
+++ b/docs/tapndrag.dia
@@ -13,22 +13,22 @@
<dia:string>#A4#</dia:string>
</dia:attribute>
<dia:attribute name="tmargin">
- <dia:real val="2.8222"/>
+ <dia:real val="2.8222000598907471"/>
</dia:attribute>
<dia:attribute name="bmargin">
- <dia:real val="2.8222"/>
+ <dia:real val="2.8222000598907471"/>
</dia:attribute>
<dia:attribute name="lmargin">
- <dia:real val="2.8222"/>
+ <dia:real val="2.8222000598907471"/>
</dia:attribute>
<dia:attribute name="rmargin">
- <dia:real val="2.8222"/>
+ <dia:real val="2.8222000598907471"/>
</dia:attribute>
<dia:attribute name="is_portrait">
<dia:boolean val="true"/>
</dia:attribute>
<dia:attribute name="scaling">
- <dia:real val="0.459"/>
+ <dia:real val="0.45899999141693115"/>
</dia:attribute>
<dia:attribute name="fitto">
<dia:boolean val="false"/>
@@ -103,7 +103,7 @@
<dia:real val="0.8"/>
</dia:attribute>
<dia:attribute name="pos">
- <dia:point val="12.0013,7.94119"/>
+ <dia:point val="12.0013,7.77119"/>
</dia:attribute>
<dia:attribute name="color">
<dia:color val="#000000"/>
@@ -154,7 +154,7 @@
<dia:real val="0.8"/>
</dia:attribute>
<dia:attribute name="pos">
- <dia:point val="12.0013,14.4485"/>
+ <dia:point val="12.0013,14.2785"/>
</dia:attribute>
<dia:attribute name="color">
<dia:color val="#000000"/>
@@ -205,7 +205,7 @@
<dia:real val="0.8"/>
</dia:attribute>
<dia:attribute name="pos">
- <dia:point val="5.44128,20.8885"/>
+ <dia:point val="5.44128,20.7185"/>
</dia:attribute>
<dia:attribute name="color">
<dia:color val="#000000"/>
@@ -256,7 +256,7 @@
<dia:real val="0.8"/>
</dia:attribute>
<dia:attribute name="pos">
- <dia:point val="12.0013,28.043"/>
+ <dia:point val="12.0013,27.873"/>
</dia:attribute>
<dia:attribute name="color">
<dia:color val="#000000"/>
@@ -307,7 +307,7 @@
<dia:real val="0.8"/>
</dia:attribute>
<dia:attribute name="pos">
- <dia:point val="21.3937,14.4485"/>
+ <dia:point val="21.3937,14.2785"/>
</dia:attribute>
<dia:attribute name="color">
<dia:color val="#000000"/>
@@ -358,7 +358,7 @@
<dia:real val="0.8"/>
</dia:attribute>
<dia:attribute name="pos">
- <dia:point val="21.3937,28.043"/>
+ <dia:point val="21.3937,27.873"/>
</dia:attribute>
<dia:attribute name="color">
<dia:color val="#000000"/>
@@ -493,7 +493,7 @@
<dia:point val="13.1503,8.3483"/>
</dia:attribute>
<dia:attribute name="curve_distance">
- <dia:real val="0.341908"/>
+ <dia:real val="0.34190799999999999"/>
</dia:attribute>
<dia:attribute name="end_arrow">
<dia:enum val="1"/>
@@ -604,19 +604,19 @@
</dia:object>
<dia:object type="UML - Note" version="0" id="O14">
<dia:attribute name="obj_pos">
- <dia:point val="5.49118,39.4412"/>
+ <dia:point val="1.84118,30.7912"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="5.44118,39.3912;17.2912,49.9912"/>
+ <dia:rectangle val="1.79118,30.7412;14.3412,42.1412"/>
</dia:attribute>
<dia:attribute name="elem_corner">
- <dia:point val="5.49118,39.4412"/>
+ <dia:point val="1.84118,30.7912"/>
</dia:attribute>
<dia:attribute name="elem_width">
- <dia:real val="11.75"/>
+ <dia:real val="12.450000000000001"/>
</dia:attribute>
<dia:attribute name="elem_height">
- <dia:real val="10.5"/>
+ <dia:real val="11.300000000000001"/>
</dia:attribute>
<dia:attribute name="line_colour">
<dia:color val="#000000"/>
@@ -638,7 +638,8 @@ M : Finger movement
[U]: Generate button up event
[D]: Generate button down event
L : Locked drags enabled
-F : Fast taps enabled#</dia:string>
+F : Fast taps enabled
+TDG: Tap-and-drag gesture enabled#</dia:string>
</dia:attribute>
<dia:attribute name="font">
<dia:font family="courier new" style="0" name="Courier"/>
@@ -647,7 +648,7 @@ F : Fast taps enabled#</dia:string>
<dia:real val="0.8"/>
</dia:attribute>
<dia:attribute name="pos">
- <dia:point val="5.84118,40.6912"/>
+ <dia:point val="2.19118,31.9287"/>
</dia:attribute>
<dia:attribute name="color">
<dia:color val="#000000"/>
@@ -663,7 +664,7 @@ F : Fast taps enabled#</dia:string>
<dia:point val="11.23,10.8357"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="11.055,10.2357;11.405,11.1857"/>
+ <dia:rectangle val="11.055,10.3482;11.405,11.3257"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
@@ -696,7 +697,7 @@ F : Fast taps enabled#</dia:string>
<dia:point val="8.4912,23.1912"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="7.9662,22.5912;9.0162,24.3412"/>
+ <dia:rectangle val="7.9662,22.7037;9.0162,24.4812"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
@@ -730,7 +731,7 @@ F : Fast taps enabled#</dia:string>
<dia:point val="17.0662,11.0357"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="16.8912,10.4357;17.2412,11.3857"/>
+ <dia:rectangle val="16.8912,10.5482;17.2412,11.5257"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
@@ -791,7 +792,7 @@ F : Fast taps enabled#</dia:string>
<dia:point val="13.73,17.0857"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="12.33,16.4857;15.13,18.2357"/>
+ <dia:rectangle val="12.33,16.5982;15.13,18.3757"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
@@ -825,7 +826,7 @@ F : Fast taps enabled#</dia:string>
<dia:point val="5.32686,26.1857"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="4.80186,25.5857;5.85186,27.3357"/>
+ <dia:rectangle val="4.80186,25.6982;5.85186,27.4757"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
@@ -859,7 +860,7 @@ F : Fast taps enabled#</dia:string>
<dia:point val="16.3912,13.6912"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="15.1662,13.0912;17.6162,14.0412"/>
+ <dia:rectangle val="15.1662,13.2037;17.6162,14.1812"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
@@ -889,15 +890,16 @@ F : Fast taps enabled#</dia:string>
</dia:object>
<dia:object type="Standard - Text" version="1" id="O22">
<dia:attribute name="obj_pos">
- <dia:point val="16.517,27.1577"/>
+ <dia:point val="16.1,28.5375"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="15.292,26.5577;17.742,27.5077"/>
+ <dia:rectangle val="14.525,28.0334;17.6916,29.8607"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
<dia:attribute name="string">
- <dia:string>#TO or M#</dia:string>
+ <dia:string>#(TO or M)
+and TDG#</dia:string>
</dia:attribute>
<dia:attribute name="font">
<dia:font family="courier new" style="0" name="Courier"/>
@@ -906,7 +908,7 @@ F : Fast taps enabled#</dia:string>
<dia:real val="0.8"/>
</dia:attribute>
<dia:attribute name="pos">
- <dia:point val="16.517,27.1577"/>
+ <dia:point val="16.1,28.5375"/>
</dia:attribute>
<dia:attribute name="color">
<dia:color val="#000000"/>
@@ -925,7 +927,7 @@ F : Fast taps enabled#</dia:string>
<dia:point val="1.24118,9.9412"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="0.36618,9.3412;2.11618,11.0912"/>
+ <dia:rectangle val="0.36618,9.4537;2.11618,11.2312"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
@@ -959,7 +961,7 @@ F : Fast taps enabled#</dia:string>
<dia:point val="24.4912,17.8412"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="23.4412,17.2412;25.5412,18.9912"/>
+ <dia:rectangle val="23.4412,17.3537;25.5412,19.1312"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
@@ -1028,7 +1030,7 @@ F : Fast taps enabled#</dia:string>
<dia:real val="0.8"/>
</dia:attribute>
<dia:attribute name="pos">
- <dia:point val="21.3937,33.7912"/>
+ <dia:point val="21.3937,33.6212"/>
</dia:attribute>
<dia:attribute name="color">
<dia:color val="#000000"/>
@@ -1079,7 +1081,7 @@ F : Fast taps enabled#</dia:string>
<dia:real val="0.8"/>
</dia:attribute>
<dia:attribute name="pos">
- <dia:point val="21.3937,39.3412"/>
+ <dia:point val="21.3937,39.1712"/>
</dia:attribute>
<dia:attribute name="color">
<dia:color val="#000000"/>
@@ -1151,7 +1153,7 @@ F : Fast taps enabled#</dia:string>
<dia:point val="20.15,30.7875"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="19.275,30.1687;21.0438,31.175"/>
+ <dia:rectangle val="19.275,30.3;21.025,31.2775"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
@@ -1184,7 +1186,7 @@ F : Fast taps enabled#</dia:string>
<dia:point val="20.7108,36.3412"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="20.5358,35.7412;20.8858,36.6912"/>
+ <dia:rectangle val="20.5358,35.8537;20.8858,36.8312"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
@@ -1217,7 +1219,7 @@ F : Fast taps enabled#</dia:string>
<dia:point val="16.7608,32.1912"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="16.392,31.5724;17.1108,34.1787"/>
+ <dia:rectangle val="16.4108,31.7037;17.1108,34.2812"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
@@ -1314,7 +1316,7 @@ M#</dia:string>
<dia:point val="31.1912,22.9412"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="30.6662,22.3224;31.735,24.1287"/>
+ <dia:rectangle val="30.6662,22.4537;31.7162,24.2312"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
@@ -1383,7 +1385,7 @@ M#</dia:string>
<dia:real val="0.8"/>
</dia:attribute>
<dia:attribute name="pos">
- <dia:point val="12.0013,20.9385"/>
+ <dia:point val="12.0013,20.7685"/>
</dia:attribute>
<dia:attribute name="color">
<dia:color val="#000000"/>
@@ -1399,16 +1401,16 @@ M#</dia:string>
<dia:point val="3.36628,12.7652"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="3.36628,12.7652;7.36628,15.4319"/>
+ <dia:rectangle val="3.36628,12.7652;7.39128,15.4485"/>
</dia:attribute>
<dia:attribute name="elem_corner">
<dia:point val="3.36628,12.7652"/>
</dia:attribute>
<dia:attribute name="elem_width">
- <dia:real val="4"/>
+ <dia:real val="4.0250000000000004"/>
</dia:attribute>
<dia:attribute name="elem_height">
- <dia:real val="2.666666666666667"/>
+ <dia:real val="2.6833333333333336"/>
</dia:attribute>
<dia:attribute name="line_colour">
<dia:color val="#000000"/>
@@ -1435,7 +1437,7 @@ Tap#</dia:string>
<dia:real val="0.8"/>
</dia:attribute>
<dia:attribute name="pos">
- <dia:point val="5.36628,13.9985"/>
+ <dia:point val="5.37878,13.8369"/>
</dia:attribute>
<dia:attribute name="color">
<dia:color val="#000000"/>
@@ -1451,7 +1453,7 @@ Tap#</dia:string>
<dia:point val="8.11628,16.7357"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="6.54128,16.1357;9.69128,18.6857"/>
+ <dia:rectangle val="6.54128,16.2482;9.69128,18.8257"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
@@ -1511,16 +1513,16 @@ Tap#</dia:string>
</dia:object>
<dia:object type="Standard - Text" version="1" id="O39">
<dia:attribute name="obj_pos">
- <dia:point val="12.8407,23.2357"/>
+ <dia:point val="13.8907,23.2857"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="12.3157,22.6357;13.3657,24.3857"/>
+ <dia:rectangle val="12.1407,22.7816;15.6573,24.6089"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
<dia:attribute name="string">
<dia:string>#T
-[D]#</dia:string>
+[D] if TDG#</dia:string>
</dia:attribute>
<dia:attribute name="font">
<dia:font family="courier new" style="0" name="Courier"/>
@@ -1529,7 +1531,7 @@ Tap#</dia:string>
<dia:real val="0.8"/>
</dia:attribute>
<dia:attribute name="pos">
- <dia:point val="12.8407,23.2357"/>
+ <dia:point val="13.8907,23.2857"/>
</dia:attribute>
<dia:attribute name="color">
<dia:color val="#000000"/>
@@ -1576,7 +1578,7 @@ Tap#</dia:string>
<dia:point val="7.37686,9.76072"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="6.85186,9.16072;7.90186,10.9107"/>
+ <dia:rectangle val="6.85186,9.27322;7.90186,11.0507"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
@@ -1638,7 +1640,7 @@ Tap#</dia:string>
<dia:point val="8.77686,12.9857"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="8.25186,12.3857;9.30186,14.1357"/>
+ <dia:rectangle val="8.25186,12.4982;9.30186,14.2757"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
@@ -1731,7 +1733,7 @@ Tap#</dia:string>
<dia:point val="26.2,27.525"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="26.2,26.9063;27.3188,27.9125"/>
+ <dia:rectangle val="26.2,26.9825;27.3875,27.9225"/>
</dia:attribute>
<dia:attribute name="text">
<dia:composite type="text">
@@ -1759,5 +1761,67 @@ Tap#</dia:string>
<dia:enum val="3"/>
</dia:attribute>
</dia:object>
+ <dia:object type="Standard - Arc" version="0" id="O47">
+ <dia:attribute name="obj_pos">
+ <dia:point val="13.1503,27.0359"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="12.6503,14.8056;17.8,27.0859"/>
+ </dia:attribute>
+ <dia:attribute name="conn_endpoints">
+ <dia:point val="13.1503,27.0359"/>
+ <dia:point val="13.1503,14.8556"/>
+ </dia:attribute>
+ <dia:attribute name="curve_distance">
+ <dia:real val="4.5996514805718602"/>
+ </dia:attribute>
+ <dia:attribute name="end_arrow">
+ <dia:enum val="22"/>
+ </dia:attribute>
+ <dia:attribute name="end_arrow_length">
+ <dia:real val="0.5"/>
+ </dia:attribute>
+ <dia:attribute name="end_arrow_width">
+ <dia:real val="0.5"/>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O3" connection="2"/>
+ <dia:connection handle="1" to="O1" connection="7"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="Standard - Text" version="1" id="O48">
+ <dia:attribute name="obj_pos">
+ <dia:point val="19.5,20.7875"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="17.925,20.2834;21.0916,22.1107"/>
+ </dia:attribute>
+ <dia:attribute name="text">
+ <dia:composite type="text">
+ <dia:attribute name="string">
+ <dia:string>#(TO or M)
+and !TDG#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="font">
+ <dia:font family="courier new" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="pos">
+ <dia:point val="19.5,20.7875"/>
+ </dia:attribute>
+ <dia:attribute name="color">
+ <dia:color val="#000000"/>
+ </dia:attribute>
+ <dia:attribute name="alignment">
+ <dia:enum val="1"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="valign">
+ <dia:enum val="3"/>
+ </dia:attribute>
+ </dia:object>
</dia:layer>
</dia:diagram>
diff --git a/include/synaptics-properties.h b/include/synaptics-properties.h
index 0b8975c..f1591a4 100644
--- a/include/synaptics-properties.h
+++ b/include/synaptics-properties.h
@@ -142,4 +142,7 @@
/* 8 bit (BOOL) */
#define SYNAPTICS_PROP_GRAB "Synaptics Grab Event Device"
+/* 8 bit (BOOL), 1 value, tap-and-drag */
+#define SYNAPTICS_PROP_GESTURES "Synaptics Gestures"
+
#endif /* _SYNAPTICS_PROPERTIES_H_ */
diff --git a/man/synaptics.man b/man/synaptics.man
index 2d4be40..372ce2d 100644
--- a/man/synaptics.man
+++ b/man/synaptics.man
@@ -28,7 +28,7 @@ Button events through short touching of the touchpad.
Double-Button events through double short touching of the touchpad.
.IP \(bu 4
Dragging through short touching and holding down the finger on the
-touchpad.
+touchpad (tap-and-drag gesture).
.IP \(bu 4
Middle and right button events on the upper and lower corner of the
touchpad.
@@ -284,7 +284,7 @@ Switch on/off guest mouse (often a stick). Property: "Synaptics Guestmouse
Off"
.TP
.BI "Option \*qLockedDrags\*q \*q" boolean \*q
-If off, a tap and drag gesture ends when you release the finger.
+If off, a tap-and-drag gesture ends when you release the finger.
.
If on, the gesture is active until you tap a second time, or until
LockedDragTimeout expires. Property: "Synaptics Locked Drags"
@@ -419,6 +419,18 @@ This can be achieved by switching to a text console and then switching
back to X.
.
.
+.TP
+.BI "Option \*qTapAndDragGesture\*q \*q" boolean \*q
+Switch on/off the tap-and-drag gesture.
+.
+This gesture is an alternative way of dragging.
+.
+It is performed by tapping (touching and releasing the finger), then
+touching again and moving the finger on the touchpad.
+.
+The gesture is enabled by default and can be disabled by setting the
+TapAndDragGesture option to false. Property: "Synaptics Gestures"
+.
.LP
The LeftEdge, RightEdge, TopEdge and BottomEdge parameters are used to
define the edge and corner areas of the touchpad.
@@ -793,6 +805,10 @@ FLOAT, 2 values, min, max.
.BI "Synaptics Grab Event Device"
8 bit (BOOL).
+.TP 7
+.BI "Synaptics Gestures"
+8 bit (BOOL), 1 value, tap-and-drag.
+
.SH "NOTES"
There is an example hal policy file in
.I ${sourcecode}/fdi/11-x11-synaptics.fdi
diff --git a/src/properties.c b/src/properties.c
index 2cf485a..886b4c1 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -80,6 +80,7 @@ Atom prop_coastspeed = 0;
Atom prop_pressuremotion = 0;
Atom prop_pressuremotion_factor = 0;
Atom prop_grab = 0;
+Atom prop_gestures = 0;
static Atom
InitAtom(DeviceIntPtr dev, char *name, int format, int nvalues, int *values)
@@ -251,6 +252,8 @@ InitDeviceProperties(LocalDevicePtr local)
prop_grab = InitAtom(local->dev, SYNAPTICS_PROP_GRAB, 8, 1, &para->grab_event_device);
+ values[0] = para->tap_and_drag_gesture;
+ prop_gestures = InitAtom(local->dev, SYNAPTICS_PROP_GESTURES, 8, 1, values);
}
int
@@ -473,6 +476,15 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
return BadMatch;
para->guestmouse_off = *(BOOL*)prop->data;
+ } else if (property == prop_gestures)
+ {
+ BOOL *gestures;
+
+ if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER)
+ return BadMatch;
+
+ gestures = (BOOL*)prop->data;
+ para->tap_and_drag_gesture = gestures[0];
} else if (property == prop_lockdrags)
{
if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER)
diff --git a/src/synaptics.c b/src/synaptics.c
index 421cc0a..ff66517 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -503,6 +503,7 @@ static void set_default_parameters(LocalDevicePtr local)
pars->press_motion_min_factor = xf86SetRealOption(opts, "PressureMotionMinFactor", 1.0);
pars->press_motion_max_factor = xf86SetRealOption(opts, "PressureMotionMaxFactor", 1.0);
pars->grab_event_device = xf86SetBoolOption(opts, "GrabEventDevice", TRUE);
+ pars->tap_and_drag_gesture = xf86SetBoolOption(opts, "TapAndDragGesture", TRUE);
/* Warn about (and fix) incorrectly configured TopEdge/BottomEdge parameters */
if (pars->top_edge > pars->bottom_edge) {
@@ -1225,7 +1226,10 @@ SetTapState(SynapticsPrivate *priv, enum TapState tap_state, int millis)
priv->tap_button_state = TBS_BUTTON_UP;
break;
case TS_3:
- priv->tap_button_state = TBS_BUTTON_DOWN;
+ if (para->tap_and_drag_gesture)
+ priv->tap_button_state = TBS_BUTTON_DOWN;
+ else
+ priv->tap_button_state = TBS_BUTTON_UP;
break;
case TS_SINGLETAP:
if (para->fast_taps)
@@ -1363,16 +1367,24 @@ HandleTapProcessing(SynapticsPrivate *priv, struct SynapticsHwState *hw,
break;
case TS_3:
if (move) {
- SetMovingState(priv, MS_TOUCHPAD_RELATIVE, hw->millis);
- SetTapState(priv, TS_DRAG, hw->millis);
+ if (para->tap_and_drag_gesture) {
+ SetMovingState(priv, MS_TOUCHPAD_RELATIVE, hw->millis);
+ SetTapState(priv, TS_DRAG, hw->millis);
+ } else {
+ SetTapState(priv, TS_1, hw->millis);
+ }
goto restart;
} else if (is_timeout) {
- if (finger == FS_TOUCHED) {
- SetMovingState(priv, MS_TOUCHPAD_RELATIVE, hw->millis);
- } else if (finger == FS_PRESSED) {
- SetMovingState(priv, MS_TRACKSTICK, hw->millis);
+ if (para->tap_and_drag_gesture) {
+ if (finger == FS_TOUCHED) {
+ SetMovingState(priv, MS_TOUCHPAD_RELATIVE, hw->millis);
+ } else if (finger == FS_PRESSED) {
+ SetMovingState(priv, MS_TRACKSTICK, hw->millis);
+ }
+ SetTapState(priv, TS_DRAG, hw->millis);
+ } else {
+ SetTapState(priv, TS_1, hw->millis);
}
- SetTapState(priv, TS_DRAG, hw->millis);
goto restart;
} else if (release) {
SetTapState(priv, TS_2B, hw->millis);
diff --git a/src/synapticsstr.h b/src/synapticsstr.h
index 15c0e90..d2ff57c 100644
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -146,6 +146,7 @@ typedef struct _SynapticsParameters
double press_motion_min_factor; /* factor applied on speed when finger pressure is at minimum */
double press_motion_max_factor; /* factor applied on speed when finger pressure is at minimum */
Bool grab_event_device; /* grab event device for exclusive use? */
+ Bool tap_and_drag_gesture; /* Switches the tap-and-drag gesture on/off */
} SynapticsParameters;
diff --git a/tools/synclient.c b/tools/synclient.c
index ebba6c3..9978dea 100644
--- a/tools/synclient.c
+++ b/tools/synclient.c
@@ -138,6 +138,7 @@ static struct Parameter params[] = {
{"PressureMotionMinFactor", PT_DOUBLE, 0, 10.0,SYNAPTICS_PROP_PRESSURE_MOTION_FACTOR, 0 /*float*/, 0},
{"PressureMotionMaxFactor", PT_DOUBLE, 0, 10.0,SYNAPTICS_PROP_PRESSURE_MOTION_FACTOR, 0 /*float*/, 1},
{"GrabEventDevice", PT_BOOL, 0, 1, SYNAPTICS_PROP_GRAB, 8, 0},
+ {"TapAndDragGesture", PT_BOOL, 0, 1, SYNAPTICS_PROP_GESTURES, 8, 0},
{ NULL, 0, 0, 0, 0 }
};