summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--include/synaptics.h12
-rw-r--r--man/synaptics.man119
-rw-r--r--src/alpscomm.c2
-rw-r--r--src/properties.c3
-rw-r--r--src/ps2comm.c13
-rw-r--r--src/psmcomm.c2
-rw-r--r--src/synaptics.c222
-rw-r--r--src/synapticsstr.h3
-rw-r--r--tools/synclient.c4
10 files changed, 200 insertions, 182 deletions
diff --git a/configure.ac b/configure.ac
index 68e9934..f78d028 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,7 @@ AC_CHECK_LIB([m], [rint])
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
# Obtain compiler/linker options for the Synaptics driver dependencies
-PKG_CHECK_MODULES(XORG, xorg-server xproto inputproto $REQUIRED_MODULES)
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6] xproto inputproto $REQUIRED_MODULES)
# X Server SDK location is required to install Synaptics header files
# This location is also relayed in the xorg-synaptics.pc file
diff --git a/include/synaptics.h b/include/synaptics.h
index 4d5a3f3..5b7764f 100644
--- a/include/synaptics.h
+++ b/include/synaptics.h
@@ -71,16 +71,4 @@ typedef struct _SynapticsSHM
#define SBR_MIN 10
#define SBR_MAX 1000
-/*
- * The x/y limits are taken from the Synaptics TouchPad interfacing Guide,
- * section 2.3.2, which says that they should be valid regardless of the
- * actual size of the sensor.
- */
-#define XMIN_NOMINAL 1472
-#define XMAX_NOMINAL 5472
-#define YMIN_NOMINAL 1408
-#define YMAX_NOMINAL 4448
-
-#define XMAX_VALID 6143
-
#endif /* _SYNAPTICS_H_ */
diff --git a/man/synaptics.man b/man/synaptics.man
index 9075c81..1b398fd 100644
--- a/man/synaptics.man
+++ b/man/synaptics.man
@@ -2,7 +2,7 @@
.ds q \N'34'
.TH SYNAPTICS __drivermansuffix__ __vendorversion__
.SH NAME
-synaptics \- Synaptics touchpad input driver
+synaptics \- touchpad input driver
.SH SYNOPSIS
.nf
.B "Section \*qInputDevice\*q"
@@ -15,10 +15,9 @@ synaptics \- Synaptics touchpad input driver
.fi
.SH DESCRIPTION
.B synaptics
-is an __xservername__ input driver for the touchpads from Synaptics
-Incorporated. Even though these touchpads (by default, operating in a
-compatibility mode emulating a standard mouse) can be handled by the normal
-evdev or mouse drivers, this driver allows more advanced features of the
+is an __xservername__ input driver for touchpads.
+Even though touchpads can be handled by the normal evdev or mouse drivers,
+this driver allows more advanced features of the
touchpad to become available. Some benefits would be:
.IP \(bu 4
Movement with adjustable, non-linear acceleration and speed.
@@ -64,7 +63,12 @@ that some functions are not available on all touchpad models, because
they need support from the touchpad hardware/firmware. (Multifinger
taps for example.)
.PP
-.SH CONFIGURATION DETAILS
+The name "synaptics" is historical and the driver still provides the
+synaptics protocol parsing code. Under Linux however, the hardware-specifics
+are handled by the kernel and this driver will work for any touchpad that
+has a working kernel driver.
+
+.SH CONFIGURATION OPTIONS
Please refer to __xconfigfile__(__filemansuffix__) for general configuration
details and for options that can be used with all input drivers. This
section only covers configuration details specific to this driver.
@@ -90,10 +94,9 @@ psm FreeBSD psm driver
.TE
.TP 7
.BI "Option \*qSHMConfig\*q \*q" boolean \*q
-Switch on/off shared memory for run-time configuration. Note that this is
-considered a security risk since any user can access the configuration. This
-option is not needed with synaptics 1.0 or later. See section
-.B Device Properties.
+Switch on/off shared memory for run-time debugging. This option does not
+have an effect on run-time configuration anymore and is only useful for
+hardware event debugging.
.TP 7
.BI "Option \*qLeftEdge\*q \*q" integer \*q
X coordinate for left edge. Property: "Synaptics Edges"
@@ -449,7 +452,46 @@ horizontal sensitivity. Setting VertResolution and HorizResolution
equal values means no compensation. Default value is read from
the touchpad or set to 1 if value could not be read.
Property: "Synaptics Pad Resolution"
-.LP
+.
+.TP
+.BI "Option \*qAreaLeftEdge\*q \*q" integer \*q
+Ignore movements, scrolling and tapping which take place left of this edge.
+.
+The option is disabled by default and can be enabled by setting the
+AreaLeftEdge option to any integer value other than zero. If supported by the
+server (version 1.9 and later), the edge may be specified in percent of
+the total width of the touchpad. Property: "Synaptics Area"
+.
+.TP
+.BI "Option \*qAreaRightEdge\*q \*q" integer \*q
+Ignore movements, scrolling and tapping which take place right of this edge.
+.
+The option is disabled by default and can be enabled by setting the
+AreaRightEdge option to any integer value other than zero. If supported by the
+server (version 1.9 and later), the edge may be specified in percent of
+the total width of the touchpad. Property: "Synaptics Area"
+.
+.TP
+.BI "Option \*qAreaTopEdge\*q \*q" integer \*q
+Ignore movements, scrolling and tapping which take place above this edge.
+.
+The option is disabled by default and can be enabled by setting the
+AreaTopEdge option to any integer value other than zero. If supported by the
+server (version 1.9 and later), the edge may be specified in percent of
+the total height of the touchpad. Property: "Synaptics Area"
+.
+.TP
+.BI "Option \*qAreaBottomEdge\*q \*q" integer \*q
+Ignore movements, scrolling and tapping which take place below this edge.
+.
+The option is disabled by default and can be enabled by setting the
+AreaBottomEdge option to any integer value other than zero. If supported by the
+server (version 1.9 and later), the edge may be specified in percent of
+the total height of the touchpad. Property: "Synaptics Area"
+.
+
+.SH CONFIGURATION DETAILS
+.SS Area handling
The LeftEdge, RightEdge, TopEdge and BottomEdge parameters are used to
define the edge and corner areas of the touchpad.
.
@@ -483,40 +525,17 @@ Physical left edge Physical right edge
Coordinates to the left of LeftEdge are part of the left edge (areas
1, 4 and 7), coordinates to the left of LeftEdge and above TopEdge
(area 1) are part of the upper left corner, etc.
-.
+.PP
A good way to find appropriate edge parameters is to enable the
SHMConfig option and run "synclient \-m 1" to see the x/y coordinates
corresponding to different positions on the touchpad.
-.
-.TP
-.BI "Option \*qAreaLeftEdge\*q \*q" integer \*q
-Ignore movements, scrolling and tapping which take place left of this edge.
-.
-The option is disabled by default and can be enabled by setting the
-AreaLeftEdge option to any integer value other than zero. Property: "Synaptics Area"
-.
-.TP
-.BI "Option \*qAreaRightEdge\*q \*q" integer \*q
-Ignore movements, scrolling and tapping which take place right of this edge.
-.
-The option is disabled by default and can be enabled by setting the
-AreaRightEdge option to any integer value other than zero. Property: "Synaptics Area"
-.
-.TP
-.BI "Option \*qAreaTopEdge\*q \*q" integer \*q
-Ignore movements, scrolling and tapping which take place above this edge.
-.
-The option is disabled by default and can be enabled by setting the
-AreaTopEdge option to any integer value other than zero. Property: "Synaptics Area"
-.
-.TP
-.BI "Option \*qAreaBottomEdge\*q \*q" integer \*q
-Ignore movements, scrolling and tapping which take place below this edge.
-.
-The option is disabled by default and can be enabled by setting the
-AreaBottomEdge option to any integer value other than zero. Property: "Synaptics Area"
-.
-.LP
+.PP
+The perceived physical edges may be adjusted with the AreaLeftEdge,
+AreaRightEdge, AreaTopEdge, and AreaBottomEdge options. If these values are
+set to something other than the physical edges, input in the space between
+the area edge and the respective physical edge is ignored. Note that this
+reduces the available space on the touchpad.
+.SS Tapping
A tap event happens when the finger is touched and released in a time
interval shorter than MaxTapTime, and the touch and release
coordinates are less than MaxTapMove units apart.
@@ -543,8 +562,7 @@ too small value means that visual feedback from the gui application
you are interacting with is harder to see.
.
For this parameter to have any effect, "FastTaps" has to be disabled.
-.
-.LP
+.SS Acceleration
The MinSpeed, MaxSpeed and AccelFactor parameters control the pointer
motion speed.
.
@@ -613,8 +631,7 @@ EdgeMotionMinZ and EdgeMotionMaxZ.
.
For a pressure value between PressureMotionMinZ and
PressureMotionMaxZ, the factor is increased linearly.
-.
-.LP
+.SS Middle button emulation
Since most synaptics touchpad models don't have a button that
corresponds to the middle button on a mouse, the driver can emulate
middle mouse button events.
@@ -623,7 +640,7 @@ If you press both the left and right mouse buttons at almost the same
time (no more than EmulateMidButtonTime milliseconds apart) the driver
generates a middle mouse button event.
.
-.LP
+.SS Circular scrolling
Circular scrolling acts like a scrolling wheel on the touchpad.
.
Scrolling is engaged when a drag starts in the given CircScrollTrigger
@@ -642,8 +659,8 @@ large circles for better control.
When used together with vertical scrolling, hitting the upper or lower
right corner will seamlessly switch over from vertical to circular
scrolling.
-.
-.LP
+
+.SS Coasting
Coasting is enabled by setting the CoastingSpeed parameter to a
non-zero value.
.
@@ -679,8 +696,8 @@ CornerCoasting takes precedence over the seamless switch from edge
scrolling to circular scrolling. That is, if CornerCoasting is
active, scrolling will stop, and circular scrolling will not start,
when the finger leaves the corner.
-.
-.LP
+
+.SS Trackstick mode
Trackstick emulation mode is entered when pressing the finger hard on
the touchpad.
.
diff --git a/src/alpscomm.c b/src/alpscomm.c
index e1a059c..c58c405 100644
--- a/src/alpscomm.c
+++ b/src/alpscomm.c
@@ -255,5 +255,5 @@ struct SynapticsProtocolOperations alps_proto_operations = {
ALPSQueryHardware,
ALPSReadHwState,
ALPSAutoDevProbe,
- NULL /* ReadDevDimensions */
+ SynapticsDefaultDimensions
};
diff --git a/src/properties.c b/src/properties.c
index 1134f7c..a5d37b3 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -29,7 +29,6 @@
#include <xorg-server.h>
#include "xf86Module.h"
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
#include <X11/Xatom.h>
#include <xf86.h>
@@ -660,5 +659,3 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
return Success;
}
-#endif
-
diff --git a/src/ps2comm.c b/src/ps2comm.c
index 241f6a6..b9420bf 100644
--- a/src/ps2comm.c
+++ b/src/ps2comm.c
@@ -44,6 +44,17 @@
#include <xf86.h>
#define MAX_UNSYNC_PACKETS 10 /* i.e. 10 to 60 bytes */
+/*
+ * The x/y limits are taken from the Synaptics TouchPad interfacing Guide,
+ * section 2.3.2, which says that they should be valid regardless of the
+ * actual size of the sensor.
+ */
+#define XMIN_NOMINAL 1472
+#define XMAX_NOMINAL 5472
+#define YMIN_NOMINAL 1408
+#define YMAX_NOMINAL 4448
+
+#define XMAX_VALID 6143
/* synaptics queries */
#define SYN_QUE_IDENTIFY 0x00
@@ -776,5 +787,5 @@ struct SynapticsProtocolOperations psaux_proto_operations = {
PS2QueryHardware,
PS2ReadHwState,
PS2AutoDevProbe,
- NULL /* ReadDevDimensions */
+ SynapticsDefaultDimensions
};
diff --git a/src/psmcomm.c b/src/psmcomm.c
index 6664c93..8a96101 100644
--- a/src/psmcomm.c
+++ b/src/psmcomm.c
@@ -188,5 +188,5 @@ struct SynapticsProtocolOperations psm_proto_operations = {
PSMQueryHardware,
PSMReadHwState,
PSMAutoDevProbe,
- NULL /* ReadDevDimensions */
+ SynapticsDefaultDimensions
};
diff --git a/src/synaptics.c b/src/synaptics.c
index ff3c945..0c9847a 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -49,6 +49,7 @@
* Linuxcare Inc. David Kennedy <dkennedy@linuxcare.com>
* Fred Hucht <fred@thp.Uni-Duisburg.de>
* Fedor P. Goncharov <fedgo@gorodok.net>
+ * Simon Thum <simon.thum@gmx.de>
*
* Trademarks are the property of their respective owners.
*/
@@ -69,10 +70,6 @@
#include <xf86Xinput.h>
#include <exevents.h>
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
-#include "mipointer.h"
-#endif
-
#include "synaptics.h"
#include "synapticsstr.h"
#include "synaptics-properties.h"
@@ -132,11 +129,9 @@ static void ReadDevDimensions(LocalDevicePtr);
static void ScaleCoordinates(SynapticsPrivate *priv, struct SynapticsHwState *hw);
static void CalculateScalingCoeffs(SynapticsPrivate *priv);
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
void InitDeviceProperties(LocalDevicePtr local);
int SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
BOOL checkonly);
-#endif
InputDriverRec SYNAPTICS = {
1,
@@ -178,6 +173,35 @@ _X_EXPORT XF86ModuleData synapticsModuleData = {
/*****************************************************************************
* Function Definitions
****************************************************************************/
+/**
+ * Fill in default dimensions for backends that cannot query the hardware.
+ * Eventually, we want the edges to be 1900/5400 for x, 1900/4000 for y.
+ * These values are based so that calculate_edge_widths() will give us the
+ * right values.
+ *
+ * The default values 1900, etc. come from the dawn of time, when men where
+ * men, or possibly apes.
+ */
+void
+SynapticsDefaultDimensions(LocalDevicePtr local)
+{
+ SynapticsPrivate *priv = (SynapticsPrivate *)local->private;
+
+ priv->minx = 1615;
+ priv->maxx = 5685;
+ priv->resx = 0;
+
+ priv->miny = 1729;
+ priv->maxy = 4171;
+ priv->resx = 0;
+
+ priv->minp = 0;
+ priv->maxp = 256;
+
+ priv->minw = 0;
+ priv->maxw = 16;
+
+}
static void
SetDeviceAndProtocol(LocalDevicePtr local)
@@ -328,6 +352,28 @@ calculate_edge_widths(SynapticsPrivate *priv, int *l, int *r, int *t, int *b)
*b = priv->maxy - eheight;
}
+/* Area options support both percent values and absolute values. This is
+ * awkward. The xf86Set* calls will print to the log, but they'll
+ * also print an error if we request a percent value but only have an
+ * int. So - check first for percent, then call xf86Set* again to get
+ * the log message.
+ */
+static int set_percent_option(pointer options, const char* optname,
+ const int range, const int offset)
+{
+ int result;
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11
+ int percent = xf86CheckPercentOption(options, optname, -1);
+
+ if (percent != -1) {
+ percent = xf86SetPercentOption(options, optname, -1);
+ result = percent/100.0 * range + offset;
+ } else
+#endif
+ result = xf86SetIntOption(options, optname, 0);
+
+ return result;
+}
static void set_default_parameters(LocalDevicePtr local)
{
@@ -352,6 +398,7 @@ static void set_default_parameters(LocalDevicePtr local)
Bool vertTwoFingerScroll, horizTwoFingerScroll;
int horizResolution = 1;
int vertResolution = 1;
+ int width, height, diag, range;
/* read the parameters */
if (priv->synshm)
@@ -367,72 +414,41 @@ static void set_default_parameters(LocalDevicePtr local)
* If the range was autodetected, apply these edge widths to all four
* sides.
*/
- if (priv->minx < priv->maxx && priv->miny < priv->maxy)
- {
- int width, height, diag;
+ if (priv->minx > priv->maxx || priv->miny < priv->maxy)
+ SynapticsDefaultDimensions(local);
+
+ width = abs(priv->maxx - priv->minx);
+ height = abs(priv->maxy - priv->miny);
+ diag = sqrt(width * width + height * height);
- width = abs(priv->maxx - priv->minx);
- height = abs(priv->maxy - priv->miny);
- diag = sqrt(width * width + height * height);
+ calculate_edge_widths(priv, &l, &r, &t, &b);
- calculate_edge_widths(priv, &l, &r, &t, &b);
+ /* Again, based on typical x/y range and defaults */
+ horizScrollDelta = diag * .020;
+ vertScrollDelta = diag * .020;
+ tapMove = diag * .044;
+ edgeMotionMinSpeed = 1;
+ edgeMotionMaxSpeed = diag * .080;
+ accelFactor = 50.0 / diag;
- /* Again, based on typical x/y range and defaults */
- horizScrollDelta = diag * .020;
- vertScrollDelta = diag * .020;
- tapMove = diag * .044;
- edgeMotionMinSpeed = 1;
- edgeMotionMaxSpeed = diag * .080;
- accelFactor = 50.0 / diag;
- } else {
- l = 1900;
- r = 5400;
- t = 1900;
- b = 4000;
-
- horizScrollDelta = 100;
- vertScrollDelta = 100;
- tapMove = 220;
- edgeMotionMinSpeed = 1;
- edgeMotionMaxSpeed = 400;
- accelFactor = 0.010;
- }
-
- if (priv->minp < priv->maxp) {
- int range = priv->maxp - priv->minp;
-
- /* scaling based on defaults below and a pressure of 256 */
- fingerLow = priv->minp + range * (25.0/256);
- fingerHigh = priv->minp + range * (30.0/256);
- fingerPress = priv->minp + range * 1.000;
- emulateTwoFingerMinZ = priv->minp + range * (282.0/256);
- edgeMotionMinZ = priv->minp + range * (30.0/256);
- edgeMotionMaxZ = priv->minp + range * (160.0/256);
- pressureMotionMinZ = priv->minp + range * (30.0/256);
- pressureMotionMaxZ = priv->minp + range * (160.0/256);
- palmMinZ = priv->minp + range * (200.0/256);
- } else {
- fingerLow = 25;
- fingerHigh = 30;
- fingerPress = 256;
- emulateTwoFingerMinZ = 257;
- edgeMotionMinZ = 30;
- edgeMotionMaxZ = 160;
- pressureMotionMinZ = 30;
- pressureMotionMaxZ = 160;
- palmMinZ = 200;
- }
-
- if (priv->minw < priv->maxw) {
- int range = priv->maxw - priv->minw;
-
- /* scaling based on defaults below and a tool width of 16 */
- palmMinWidth = priv->minw + range * (10.0/16);
- emulateTwoFingerMinW = priv->minw + range * (7.0/16);
- } else {
- palmMinWidth = 10;
- emulateTwoFingerMinW = 7;
- }
+ range = priv->maxp - priv->minp;
+
+ /* scaling based on defaults and a pressure of 256 */
+ fingerLow = priv->minp + range * (25.0/256);
+ fingerHigh = priv->minp + range * (30.0/256);
+ fingerPress = priv->minp + range * 1.000;
+ emulateTwoFingerMinZ = priv->minp + range * (282.0/256);
+ edgeMotionMinZ = priv->minp + range * (30.0/256);
+ edgeMotionMaxZ = priv->minp + range * (160.0/256);
+ pressureMotionMinZ = priv->minp + range * (30.0/256);
+ pressureMotionMaxZ = priv->minp + range * (160.0/256);
+ palmMinZ = priv->minp + range * (200.0/256);
+
+ range = priv->maxw - priv->minw;
+
+ /* scaling based on defaults below and a tool width of 16 */
+ palmMinWidth = priv->minw + range * (10.0/16);
+ emulateTwoFingerMinW = priv->minw + range * (7.0/16);
/* Enable tap if we don't have a phys left button */
tapButton1 = priv->has_left ? 0 : 1;
@@ -465,10 +481,10 @@ static void set_default_parameters(LocalDevicePtr local)
pars->top_edge = xf86SetIntOption(opts, "TopEdge", t);
pars->bottom_edge = xf86SetIntOption(opts, "BottomEdge", b);
- pars->area_top_edge = xf86SetIntOption(opts, "AreaTopEdge", 0);
- pars->area_bottom_edge = xf86SetIntOption(opts, "AreaBottomEdge", 0);
- pars->area_left_edge = xf86SetIntOption(opts, "AreaLeftEdge", 0);
- pars->area_right_edge = xf86SetIntOption(opts, "AreaRightEdge", 0);
+ pars->area_top_edge = set_percent_option(opts, "AreaTopEdge", height, priv->miny);
+ pars->area_bottom_edge = set_percent_option(opts, "AreaBottomEdge", height, priv->miny);
+ pars->area_left_edge = set_percent_option(opts, "AreaLeftEdge", width, priv->minx);
+ pars->area_right_edge = set_percent_option(opts, "AreaRightEdge", width, priv->minx);
pars->finger_low = xf86SetIntOption(opts, "FingerLow", fingerLow);
pars->finger_high = xf86SetIntOption(opts, "FingerHigh", fingerHigh);
@@ -547,24 +563,29 @@ static void set_default_parameters(LocalDevicePtr local)
}
}
-static float SynapticsAccelerationProfile
- (DeviceIntPtr dev,
- DeviceVelocityPtr vel,
- float velocity,
- float thr,
- float acc) {
+static float SynapticsAccelerationProfile(DeviceIntPtr dev,
+ DeviceVelocityPtr vel,
+ float velocity,
+ float thr,
+ float acc) {
LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate;
SynapticsPrivate *priv = (SynapticsPrivate *) (local->private);
SynapticsParameters* para = &priv->synpara;
double accelfct;
+ /*
+ * synaptics accel was originally base on device coordinate based
+ * velocity, which we recover this way so para->accl retains its scale.
+ */
+ velocity /= vel->const_acceleration;
+
/* speed up linear with finger velocity */
accelfct = velocity * para->accl;
/* clip acceleration factor */
- if (accelfct > para->max_speed)
- accelfct = para->max_speed;
+ if (accelfct > para->max_speed * acc)
+ accelfct = para->max_speed * acc;
else if (accelfct < para->min_speed)
accelfct = para->min_speed;
@@ -630,10 +651,6 @@ SynapticsPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
local->private_flags = 0;
local->flags = XI86_POINTER_CAPABLE | XI86_SEND_DRAG_EVENTS;
local->conf_idev = dev;
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
- local->motion_history_proc = xf86GetMotionEvents;
- local->history_size = 0;
-#endif
local->always_core_feedback = 0;
xf86Msg(X_INFO, "Synaptics touchpad driver version %s\n", PACKAGE_VERSION);
@@ -682,10 +699,6 @@ SynapticsPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
goto SetupProc_fail;
}
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
- local->history_size = xf86SetIntOption(local->options, "HistorySize", 0);
-#endif
-
xf86ProcessCommonOptions(local, local->options);
local->flags |= XI86_CONFIGURED;
@@ -921,17 +934,8 @@ DeviceInit(DeviceIntPtr dev)
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
btn_labels,
#endif
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
- miPointerGetMotionEvents,
-#elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
- GetMotionHistory,
-#endif
SynapticsCtrl,
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
- miPointerGetMotionBufferSize()
-#else
GetMotionHistorySize(), 2
-#endif
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
, axes_labels
#endif
@@ -944,26 +948,30 @@ DeviceInit(DeviceIntPtr dev)
*/
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
if (NULL != (pVel = GetDevicePredictableAccelData(dev))) {
- SetDeviceSpecificAccelerationProfile(pVel, SynapticsAccelerationProfile);
+ SetDeviceSpecificAccelerationProfile(pVel,
+ SynapticsAccelerationProfile);
/* float property type */
float_type = XIGetKnownProperty(XATOM_FLOAT);
/* translate MinAcc to constant deceleration.
- * May be overridden in xf86IVD */
+ * May be overridden in xf86InitValuatorDefaults */
tmpf = 1.0 / priv->synpara.min_speed;
- xf86Msg(X_CONFIG, "%s: (accel) MinSpeed is now constant deceleration %.1f\n",
- dev->name, tmpf);
+ xf86Msg(X_CONFIG, "%s: (accel) MinSpeed is now constant deceleration "
+ "%.1f\n", dev->name, tmpf);
prop = XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION);
XIChangeDeviceProperty(dev, prop, float_type, 32,
PropModeReplace, 1, &tmpf, FALSE);
/* adjust accordingly */
priv->synpara.max_speed /= priv->synpara.min_speed;
- /* leave priv->synpara.accl alone since velocity includes const decel */
priv->synpara.min_speed = 1.0;
+ /* synaptics seems to report 80 packet/s, but dix scales for
+ * 100 packet/s by default. */
+ pVel->corr_mul = 12.5f; /*1000[ms]/80[/s] = 12.5 */
+
xf86Msg(X_CONFIG, "%s: MaxSpeed is now %.1f\n",
dev->name, priv->synpara.max_speed);
xf86Msg(X_CONFIG, "%s: AccelFactor is now %.1f\n",
@@ -1012,17 +1020,11 @@ DeviceInit(DeviceIntPtr dev)
min, max, priv->resy * 1000, 0, priv->resy * 1000);
xf86InitValuatorDefaults(dev, 1);
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
- xf86MotionHistoryAllocate(local);
-#endif
-
if (!alloc_param_data(local))
return !Success;
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
InitDeviceProperties(local);
XIRegisterPropertyHandler(local->dev, SetProperty, NULL, NULL);
-#endif
return Success;
}
@@ -2452,7 +2454,7 @@ static int
SwitchMode(ClientPtr client, DeviceIntPtr dev, int mode)
{
DBG(3, "SwitchMode called\n");
- return Success;
+ return (mode == Relative) ? Success : XI_BadMode;
}
static Bool
diff --git a/src/synapticsstr.h b/src/synapticsstr.h
index d123257..a63df23 100644
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -237,4 +237,7 @@ typedef struct _SynapticsPrivateRec
enum TouchpadModel model; /* The detected model */
} SynapticsPrivate;
+
+extern void SynapticsDefaultDimensions(LocalDevicePtr local);
+
#endif /* _SYNAPTICSSTR_H_ */
diff --git a/tools/synclient.c b/tools/synclient.c
index 316ae2c..ffbbd5f 100644
--- a/tools/synclient.c
+++ b/tools/synclient.c
@@ -97,8 +97,8 @@ static struct Parameter params[] = {
{"CornerCoasting", PT_BOOL, 0, 1, SYNAPTICS_PROP_SCROLL_EDGE, 8, 2},
{"VertTwoFingerScroll", PT_BOOL, 0, 1, SYNAPTICS_PROP_SCROLL_TWOFINGER, 8, 0},
{"HorizTwoFingerScroll", PT_BOOL, 0, 1, SYNAPTICS_PROP_SCROLL_TWOFINGER, 8, 1},
- {"MinSpeed", PT_DOUBLE, 0, 1.0, SYNAPTICS_PROP_SPEED, 0, /*float */ 0},
- {"MaxSpeed", PT_DOUBLE, 0, 1.0, SYNAPTICS_PROP_SPEED, 0, /*float */ 1},
+ {"MinSpeed", PT_DOUBLE, 0, 255.0, SYNAPTICS_PROP_SPEED, 0, /*float */ 0},
+ {"MaxSpeed", PT_DOUBLE, 0, 255.0, SYNAPTICS_PROP_SPEED, 0, /*float */ 1},
{"AccelFactor", PT_DOUBLE, 0, 1.0, SYNAPTICS_PROP_SPEED, 0, /*float */ 2},
{"TrackstickSpeed", PT_DOUBLE, 0, 200.0, SYNAPTICS_PROP_SPEED, 0, /*float */ 3},
{"EdgeMotionMinZ", PT_INT, 1, 255, SYNAPTICS_PROP_EDGEMOTION_PRESSURE, 32, 0},