[PATCH xf86-input-synaptics 07/12] Enable clickpad click and drag with two fingers
Peter Hutterer
peter.hutterer at who-t.net
Wed Feb 22 19:58:45 PST 2012
On Thu, Feb 09, 2012 at 06:53:01PM -0800, Chase Douglas wrote:
> Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
> ---
> src/synaptics.c | 11 +++++++++++
> 1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/src/synaptics.c b/src/synaptics.c
> index 662e060..473ce13 100644
> --- a/src/synaptics.c
> +++ b/src/synaptics.c
> @@ -1889,10 +1889,13 @@ HandleTapProcessing(SynapticsPrivate *priv, struct SynapticsHwState *hw,
> hw->left = 0;
> break;
> case TS_CLICKPAD_MOVE:
> + if (hw->numFingers > 1)
> + hw->numFingers--;
> SetMovingState(priv, MS_TOUCHPAD_RELATIVE, now);
> if (!hw->left && !hw->right && !hw->middle) {
> SetMovingState(priv, MS_FALSE, now);
> SetTapState(priv, TS_MOVE, now);
> + priv->count_packet_finger = 0;
> }
> break;
> }
> @@ -2777,6 +2780,14 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
> if (para->touchpad_off == 1)
> return delay;
>
> + /* If a physical button is pressed on a clickpad, use cumulative touch
> + * movements for motion */
> + if (para->clickpad && (hw->left || hw->right || hw->middle))
> + {
> + hw->x = hw->cumulative_dx;
> + hw->y = hw->cumulative_dy;
> + }
> +
help me out here: hw->x is absolute, but hw->cumulative_dx is relative. how
do we deal with this?
Cheers,
Peter
> /* apply hysteresis before doing anything serious. This cancels
> * out a lot of noise which might surface in strange phenomena
> * like flicker in scrolling or noise motion. */
> --
> 1.7.8.3
>
More information about the xorg-devel
mailing list