summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-02-05 22:50:47 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-05-10 09:42:43 +1000
commit3b02e7fd81da4b100fb9ac32378f6d50f54cf0e2 (patch)
tree50e8063fd2b565df083d0b5ba2c7d70f0e571248
parent0903d99ada1755f11a2a5cbf89a345de896e18ec (diff)
Drop circular pad support
Do such devices still exist? Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--include/synaptics-properties.h3
-rw-r--r--man/synaptics.man10
-rw-r--r--src/properties.c9
-rw-r--r--src/synaptics.c55
-rw-r--r--src/synapticsstr.h1
-rw-r--r--tools/synclient.c1
6 files changed, 2 insertions, 77 deletions
diff --git a/include/synaptics-properties.h b/include/synaptics-properties.h
index 19bd2b2..b717880 100644
--- a/include/synaptics-properties.h
+++ b/include/synaptics-properties.h
@@ -116,9 +116,6 @@
#define SYNAPTICS_PROP_CIRCULAR_SCROLLING_TRIGGER "Synaptics Circular Scrolling Trigger"
/* 8 bit (BOOL) */
-#define SYNAPTICS_PROP_CIRCULAR_PAD "Synaptics Circular Pad"
-
-/* 8 bit (BOOL) */
#define SYNAPTICS_PROP_PALM_DETECT "Synaptics Palm Detection"
/* 32 bit, 2 values, width, z */
diff --git a/man/synaptics.man b/man/synaptics.man
index 0fa396f..03f18ac 100644
--- a/man/synaptics.man
+++ b/man/synaptics.man
@@ -316,13 +316,6 @@ l l.
.TE
Property: "Synaptics Circular Scrolling Trigger"
.TP
-.BI "Option \*qCircularPad\*q \*q" boolean \*q
-.
-Instead of being a rectangle, the edge is the ellipse enclosed by the
-Left/Right/Top/BottomEdge parameters.
-.
-For circular touchpads. Property: "Synaptics Circular Pad"
-.TP
.BI "Option \*qPalmDetect\*q \*q" boolean \*q
If palm detection should be enabled.
.
@@ -908,7 +901,8 @@ The following options are no longer part of the driver configuration:
.BI "Option \*qLeftRightScrollRepeat\*q \*q" boolean \*q
.TP
.BI "Option \*qScrollButtonRepeat\*q \*q" integer \*q
-
+.TP
+.BI "Option \*qCircularPad\*q \*q" boolean \*q
.SH "AUTHORS"
.LP
diff --git a/src/properties.c b/src/properties.c
index 3d6be7e..2147b62 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -277,9 +277,6 @@ InitDeviceProperties(InputInfoPtr pInfo)
prop_circscroll_trigger =
InitAtom(pInfo->dev, SYNAPTICS_PROP_CIRCULAR_SCROLLING_TRIGGER, 8, 1,
&para->circular_trigger);
- prop_circpad =
- InitAtom(pInfo->dev, SYNAPTICS_PROP_CIRCULAR_PAD, 8, 1,
- &para->circular_pad);
prop_palm =
InitAtom(pInfo->dev, SYNAPTICS_PROP_PALM_DETECT, 8, 1,
&para->palm_detect);
@@ -612,12 +609,6 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
para->circular_trigger = trigger;
}
- else if (property == prop_circpad) {
- if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER)
- return BadMatch;
-
- para->circular_pad = *(BOOL *) prop->data;
- }
else if (property == prop_palm) {
if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER)
return BadMatch;
diff --git a/src/synaptics.c b/src/synaptics.c
index 36f534d..819f0e2 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -680,7 +680,6 @@ set_default_parameters(InputInfoPtr pInfo)
pars->circular_scrolling =
xf86SetBoolOption(opts, "CircularScrolling", FALSE);
pars->circular_trigger = xf86SetIntOption(opts, "CircScrollTrigger", 0);
- pars->circular_pad = xf86SetBoolOption(opts, "CircularPad", FALSE);
pars->palm_detect = xf86SetBoolOption(opts, "PalmDetect", FALSE);
pars->palm_min_width = xf86SetIntOption(opts, "PalmMinWidth", palmMinWidth);
pars->palm_min_z = xf86SetIntOption(opts, "PalmMinZ", palmMinZ);
@@ -1375,32 +1374,6 @@ DeviceInit(DeviceIntPtr dev)
return !Success;
}
-/*
- * Convert from absolute X/Y coordinates to a coordinate system where
- * -1 corresponds to the left/upper edge and +1 corresponds to the
- * right/lower edge.
- */
-static void
-relative_coords(SynapticsPrivate * priv, int x, int y,
- double *relX, double *relY)
-{
- int minX = priv->synpara.left_edge;
- int maxX = priv->synpara.right_edge;
- int minY = priv->synpara.top_edge;
- int maxY = priv->synpara.bottom_edge;
- double xCenter = (minX + maxX) / 2.0;
- double yCenter = (minY + maxY) / 2.0;
-
- if ((maxX - xCenter > 0) && (maxY - yCenter > 0)) {
- *relX = (x - xCenter) / (maxX - xCenter);
- *relY = (y - yCenter) / (maxY - yCenter);
- }
- else {
- *relX = 0;
- *relY = 0;
- }
-}
-
/* return angle of point relative to center */
static double
angle(SynapticsPrivate * priv, int x, int y)
@@ -1425,38 +1398,10 @@ diffa(double a1, double a2)
}
static edge_type
-circular_edge_detection(SynapticsPrivate * priv, int x, int y)
-{
- edge_type edge = 0;
- double relX, relY, relR;
-
- relative_coords(priv, x, y, &relX, &relY);
- relR = SQR(relX) + SQR(relY);
-
- if (relR > 1) {
- /* we are outside the ellipse enclosed by the edge parameters */
- if (relX > M_SQRT1_2)
- edge |= RIGHT_EDGE;
- else if (relX < -M_SQRT1_2)
- edge |= LEFT_EDGE;
-
- if (relY < -M_SQRT1_2)
- edge |= TOP_EDGE;
- else if (relY > M_SQRT1_2)
- edge |= BOTTOM_EDGE;
- }
-
- return edge;
-}
-
-static edge_type
edge_detection(SynapticsPrivate * priv, int x, int y)
{
edge_type edge = NO_EDGE;
- if (priv->synpara.circular_pad)
- return circular_edge_detection(priv, x, y);
-
if (x > priv->synpara.right_edge)
edge |= RIGHT_EDGE;
else if (x < priv->synpara.left_edge)
diff --git a/src/synapticsstr.h b/src/synapticsstr.h
index d894b63..7024a9b 100644
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -150,7 +150,6 @@ typedef struct _SynapticsParameters {
Bool circular_scrolling; /* Enable circular scrolling */
double scroll_dist_circ; /* Scrolling angle radians */
int circular_trigger; /* Trigger area for circular scrolling */
- Bool circular_pad; /* Edge has an oval or circular shape */
Bool palm_detect; /* Enable Palm Detection */
int palm_min_width; /* Palm detection width */
int palm_min_z; /* Palm detection depth */
diff --git a/tools/synclient.c b/tools/synclient.c
index cec1cd6..74eb504 100644
--- a/tools/synclient.c
+++ b/tools/synclient.c
@@ -113,7 +113,6 @@ static struct Parameter params[] = {
{"CircularScrolling", PT_BOOL, 0, 1, SYNAPTICS_PROP_CIRCULAR_SCROLLING, 8, 0},
{"CircScrollDelta", PT_DOUBLE, .01, 3, SYNAPTICS_PROP_CIRCULAR_SCROLLING_DIST, 0 /* float */, 0},
{"CircScrollTrigger", PT_INT, 0, 8, SYNAPTICS_PROP_CIRCULAR_SCROLLING_TRIGGER, 8, 0},
- {"CircularPad", PT_BOOL, 0, 1, SYNAPTICS_PROP_CIRCULAR_PAD, 8, 0},
{"PalmDetect", PT_BOOL, 0, 1, SYNAPTICS_PROP_PALM_DETECT, 8, 0},
{"PalmMinWidth", PT_INT, 0, 15, SYNAPTICS_PROP_PALM_DIMENSIONS, 32, 0},
{"PalmMinZ", PT_INT, 0, 255, SYNAPTICS_PROP_PALM_DIMENSIONS, 32, 1},