From 1f0eca4531f9a8324ff1e56afd97d9d91d1f3b0c Mon Sep 17 00:00:00 2001 Message-Id: <1f0eca4531f9a8324ff1e56afd97d9d91d1f3b0c.1248664283.git.yan.i.li@intel.com> From: Yan Li Date: Mon, 27 Jul 2009 11:09:14 +0800 Subject: [PATCH] Remove the "SpecialScrollAreaRight" option. This option auto-adjusts the right edge on the touchpad but wrongly so. It does not take the edge width into account, thus setting the right edge to the max value received - leaving only a single-pixel scroll area in some cases. This patch is backported to 1.1.2 by Yan Li from patches of upstream bug report (https://bugs.freedesktop.org/show_bug.cgi?id=21001, https://bugs.freedesktop.org/attachment.cgi?id=28018, by Peter Hutterer ) Signed-off-by: Yan Li --- man/synaptics.man | 8 +------- src/synaptics.c | 25 ------------------------- src/synapticsstr.h | 1 - 3 files changed, 1 insertions(+), 33 deletions(-) diff --git a/man/synaptics.man b/man/synaptics.man index 2d4be40..4bc9e40 100644 --- a/man/synaptics.man +++ b/man/synaptics.man @@ -99,9 +99,7 @@ option is not needed with synaptics 1.0 or later. See section X coordinate for left edge. Property: "Synaptics Edges" .TP 7 .BI "Option \*qRightEdge\*q \*q" integer \*q -X coordinate for right edge. If this option is set, -.BI SpecialScrollAreaRight -is ignored. Property: "Synaptics Edges" +X coordinate for right edge. Property: "Synaptics Edges" .TP 7 .BI "Option \*qTopEdge\*q \*q" integer \*q Y coordinate for top edge. Property: "Synaptics Edges" @@ -109,10 +107,6 @@ Y coordinate for top edge. Property: "Synaptics Edges" .BI "Option \*qBottomEdge\*q \*q" integer \*q Y coordinate for bottom edge. Property: "Synaptics Edges" .TP 7 -.BI "Option \*qSpecialScrollAreaRight\*q \*q" boolean \*q -Some touchpads have a scroll region on the right edge. Disable this option if -you have one but don't want use it as scroll wheel region. -.TP 7 .BI "Option \*qFingerLow\*q \*q" integer \*q When finger pressure drops below this value, the driver counts it as a release. Property: "Synaptics Finger" diff --git a/src/synaptics.c b/src/synaptics.c index fdd7790..20093c2 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -452,11 +452,6 @@ static void set_default_parameters(LocalDevicePtr local) pars->scroll_dist_vert = xf86SetIntOption(opts, "VertScrollDelta", horizScrollDelta); pars->scroll_dist_horiz = xf86SetIntOption(opts, "HorizScrollDelta", vertScrollDelta); pars->scroll_edge_vert = xf86SetBoolOption(opts, "VertEdgeScroll", vertEdgeScroll); - if (xf86CheckIfOptionUsedByName(opts, "RightEdge")) { - pars->special_scroll_area_right = FALSE; - } else { - pars->special_scroll_area_right = xf86SetBoolOption(opts, "SpecialScrollAreaRight", TRUE); - } pars->scroll_edge_horiz = xf86SetBoolOption(opts, "HorizEdgeScroll", horizEdgeScroll); pars->scroll_edge_corner = xf86SetBoolOption(opts, "CornerCoasting", FALSE); pars->scroll_twofinger_vert = xf86SetBoolOption(opts, "VertTwoFingerScroll", vertTwoFingerScroll); @@ -600,8 +595,6 @@ SynapticsPreInit(InputDriverPtr drv, IDevPtr dev, int flags) set_default_parameters(local); - priv->largest_valid_x = MIN(priv->synpara_default.right_edge, XMAX_NOMINAL); - if (!alloc_param_data(local)) goto SetupProc_fail; @@ -2004,24 +1997,6 @@ HandleState(LocalDevicePtr local, struct SynapticsHwState *hw) hw->multi[2] = hw->multi[3] = FALSE; } - /* - * Some touchpads have a scroll wheel region where a very large X - * coordinate is reported. In this case for eliminate discontinuity, - * we adjust X and simulate new zone which adjacent to right edge. - */ - if (hw->x <= XMAX_VALID) { - if (priv->largest_valid_x < hw->x) - priv->largest_valid_x = hw->x; - } else { - hw->x = priv->largest_valid_x + 1; - /* - * If user didn't set right_edge manualy, auto-adjust to bounds of - * hardware scroll area. - */ - if (para->special_scroll_area_right) - priv->synpara->right_edge = priv->largest_valid_x; - } - edge = edge_detection(priv, hw->x, hw->y); finger = SynapticsDetectFinger(priv, hw); diff --git a/src/synapticsstr.h b/src/synapticsstr.h index d5a3f91..8b8df9c 100644 --- a/src/synapticsstr.h +++ b/src/synapticsstr.h @@ -105,7 +105,6 @@ typedef struct _SynapticsPrivateRec SynapticsMoveHistRec move_hist[SYNAPTICS_MOVE_HISTORY]; /* movement history */ int hist_index; /* Last added entry in move_hist[] */ - int largest_valid_x; /* Largest valid X coordinate seen so far */ int scroll_y; /* last y-scroll position */ int scroll_x; /* last x-scroll position */ double scroll_a; /* last angle-scroll position */ -- 1.5.6.5