summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVaclav Kadlcik <vaclav.kadlcik@i.cz>2006-05-07 23:14:11 +0200
committerPeter Osterlund <petero2@telia.com>2006-05-07 23:14:11 +0200
commit470e6feb3ac676c13868ca4fb14180d32cadfc71 (patch)
tree5b26ee59d8d641906340ac274e430e12223980c9
parent9db4f87799188c14bcb797b86f06ba59e7759535 (diff)
Add new parameter "SingleTapTimeout".
This patch adds a new parameter - "SingleTapTimeout" - to control the "2A -> SINGLETAP" transition. This gives greater control of tap behavior. For exmple, it is possible to disable tap-and-drag by setting the parameter to 0.
-rw-r--r--docs/tapndrag.dia3
-rw-r--r--manpages/synaptics.53
-rw-r--r--synaptics.c4
-rw-r--r--synaptics.h1
-rw-r--r--synclient.c1
5 files changed, 10 insertions, 2 deletions
diff --git a/docs/tapndrag.dia b/docs/tapndrag.dia
index e26b628..b50acb3 100644
--- a/docs/tapndrag.dia
+++ b/docs/tapndrag.dia
@@ -590,6 +590,7 @@ R : Release
TO : Tap Timeout
TO2: Mouse click timeout
TO3: Double tap timeout
+TO4: Single tap timeout
M : Finger movement
[U]: Generate button up event
[D]: Generate button down event
@@ -1349,7 +1350,7 @@ Tap#</dia:string>
<dia:attribute name="text">
<dia:composite type="text">
<dia:attribute name="string">
- <dia:string>#TO
+ <dia:string>#TO4
[U] if F
[D] if !F#</dia:string>
</dia:attribute>
diff --git a/manpages/synaptics.5 b/manpages/synaptics.5
index e7d4c86..f5061f9 100644
--- a/manpages/synaptics.5
+++ b/manpages/synaptics.5
@@ -307,6 +307,9 @@ Minimum finger pressure at which touch is considered a palm.
Coasting threshold scrolling speed.
.
0 disables coasting.
+.TP
+\fBSingleTapTimeout\fR (Integer)
+Timeout after a tap to recognize it as a single tap.
.
.
.LP
diff --git a/synaptics.c b/synaptics.c
index 40e7f03..2a17f81 100644
--- a/synaptics.c
+++ b/synaptics.c
@@ -404,6 +404,7 @@ SynapticsPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
pars->palm_detect = xf86SetBoolOption(opts, "PalmDetect", TRUE);
pars->palm_min_width = xf86SetIntOption(opts, "PalmMinWidth", 10);
pars->palm_min_z = xf86SetIntOption(opts, "PalmMinZ", 200);
+ pars->single_tap_timeout = xf86SetIntOption(opts, "SingleTapTimeout", 180);
pars->press_motion_min_z = xf86SetIntOption(opts, "PressureMotionMinZ", pars->edge_motion_min_z);
pars->press_motion_max_z = xf86SetIntOption(opts, "PressureMotionMaxZ", pars->edge_motion_max_z);
@@ -1030,12 +1031,13 @@ GetTimeOut(SynapticsPrivate *priv)
switch (priv->tap_state) {
case TS_1:
- case TS_2A:
case TS_3:
case TS_5:
return para->tap_time;
case TS_SINGLETAP:
return para->click_time;
+ case TS_2A:
+ return para->single_tap_timeout;
case TS_2B:
return para->tap_time_2;
default:
diff --git a/synaptics.h b/synaptics.h
index 3591181..12fe8dc 100644
--- a/synaptics.h
+++ b/synaptics.h
@@ -53,6 +53,7 @@ typedef struct _SynapticsSHM
int finger_low, finger_high; /* finger detection values in Z-values */
int tap_time;
int tap_move; /* max. tapping time and movement in packets and coord. */
+ int single_tap_timeout; /* timeout to recognize a single tap */
int tap_time_2; /* max. tapping time for double taps */
int click_time; /* The duration of a single click */
Bool fast_taps; /* Faster reaction to single taps */
diff --git a/synclient.c b/synclient.c
index e9d72f3..371611a 100644
--- a/synclient.c
+++ b/synclient.c
@@ -58,6 +58,7 @@ static struct Parameter params[] = {
DEFINE_PAR("MaxTapTime", tap_time, PT_INT, 0, 1000),
DEFINE_PAR("MaxTapMove", tap_move, PT_INT, 0, 2000),
DEFINE_PAR("MaxDoubleTapTime", tap_time_2, PT_INT, 0, 1000),
+ DEFINE_PAR("SingleTapTimeout", single_tap_timeout, PT_INT, 0, 1000),
DEFINE_PAR("ClickTime", click_time, PT_INT, 0, 1000),
DEFINE_PAR("FastTaps", fast_taps, PT_BOOL, 0, 1),
DEFINE_PAR("EmulateMidButtonTime", emulate_mid_button_time, PT_INT, 0, 1000),