[PATCH xf86-input-synaptics v4 03/10] Disable click action functionality for clickpads by default
Peter Hutterer
peter.hutterer at who-t.net
Sun Mar 4 22:00:48 PST 2012
On Fri, Mar 02, 2012 at 12:42:29PM -0800, Chase Douglas wrote:
> Clickpad press-and-drag with two fingers will break click actions.
> Disable them for these devices by default until a good solution is found
> for letting both functionalities co-exist.
>
> Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
> ---
> src/properties.c | 14 ++++++++++++++
> src/synaptics.c | 11 +++++++----
> 2 files changed, 21 insertions(+), 4 deletions(-)
>
> diff --git a/src/properties.c b/src/properties.c
> index 38f21b2..11b4156 100644
> --- a/src/properties.c
> +++ b/src/properties.c
> @@ -400,6 +400,20 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
> return BadMatch;
>
> para->clickpad = *(BOOL*)prop->data;
> +
> + /* ClickPad support conflicts with click action support. Reset click
> + * actions. The user can override afterwards if they really want. */
> + if (para->clickpad)
> + {
> + CARD8 values[3] = {};
> +
> + para->click_action[F1_CLICK1] = 0;
> + para->click_action[F2_CLICK1] = 0;
> + para->click_action[F3_CLICK1] = 0;
> +
> + XIChangeDeviceProperty(dev, prop_clickaction, XA_INTEGER, 8,
> + PropModeReplace, 3, values, TRUE);
> + }
no. this isn't something we do in the driver, this is something we let the
client handle.
having this as a startup default if a clickpad is detected is fair enough,
but no weird (undocumented!) property cross-interaction please.
leave this hunk out please.
> } else if (property == prop_tap_fast)
> {
> if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER)
> diff --git a/src/synaptics.c b/src/synaptics.c
> index 64e87da..f1b76ee 100644
> --- a/src/synaptics.c
> +++ b/src/synaptics.c
> @@ -428,7 +428,7 @@ static void set_default_parameters(InputInfoPtr pInfo)
> int pressureMotionMinZ, pressureMotionMaxZ; /* pressure */
> int palmMinWidth, palmMinZ; /* pressure */
> int tapButton1, tapButton2, tapButton3;
> - int clickFinger1, clickFinger2, clickFinger3;
> + int clickFinger1 = 0, clickFinger2 = 0, clickFinger3 = 0;
> Bool vertEdgeScroll, horizEdgeScroll;
> Bool vertTwoFingerScroll, horizTwoFingerScroll;
> int horizResolution = 1;
> @@ -500,9 +500,12 @@ static void set_default_parameters(InputInfoPtr pInfo)
>
> /* Enable multifinger-click if only have one physical button,
> otherwise clickFinger is always button 1. */
this comment is now incorrect.
Cheers,
Peter
> - clickFinger1 = 1;
> - clickFinger2 = (priv->has_right || priv->has_middle) ? 1 : 3;
> - clickFinger3 = (priv->has_right || priv->has_middle) ? 1 : 2;
> + if (!pars->clickpad)
> + {
> + clickFinger1 = 1;
> + clickFinger2 = (priv->has_right || priv->has_middle) ? 1 : 3;
> + clickFinger3 = (priv->has_right || priv->has_middle) ? 1 : 2;
> + }
>
> /* Enable vert edge scroll if we can't detect doubletap */
> vertEdgeScroll = priv->has_double ? FALSE : TRUE;
> --
> 1.7.9
More information about the xorg-devel
mailing list