diff options
author | Hans de Goede <hdegoede@redhat.com> | 2014-02-19 18:30:35 +0100 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2014-02-20 14:17:38 +1000 |
commit | 945acfc261707be78cbc5438c22b061e20076004 (patch) | |
tree | fda35b8bc6e0b5389881561a9317d216d590f5e6 /src | |
parent | 2ea76fad6545a712713de1a09965158805e83c55 (diff) |
Allow using the entire touchpad for motions started inside the active area
synaptics offers an option to make parts of the touchpad insensitive. This
is ie useful to do palm avoidance rather then palm detection (which may be
unreliable) by disabling an area of 15% on the right and left side of the
touchpad.
Currently a motion which has started inside the active area, stops as soon
as it moves outside of the active area.
If a motion started inside the active area and thus has already generated some
move events, this makes no sense. If the user moves outside of the active
area in this case, this is very likely because the user wants to continue
the motion.
This commit allows such motions to continue normally.
I would like to thank Juerd Waalboer for the basic idea, some coding and lots
of testing for this fix.
Cc: Juerd Waalboer <juerd@tnx.nl>
Reported-by: Juerd Waalboer <juerd@tnx.nl>
Tested-by: Juerd Waalboer <juerd@tnx.nl>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/synaptics.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/synaptics.c b/src/synaptics.c index 5794dae..1666045 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -1434,6 +1434,11 @@ is_inside_active_area(SynapticsPrivate * priv, int x, int y) { Bool inside_area = TRUE; + /* If a finger is down, then it must have started inside the active_area, + allow the motion to complete using the entire area */ + if (priv->finger_state >= FS_TOUCHED) + return TRUE; + if ((priv->synpara.area_left_edge != 0) && (x < priv->synpara.area_left_edge)) inside_area = FALSE; @@ -3028,13 +3033,9 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now, invalid are: x, y, z, numFingers, fingerWidth valid are: millis, left/right/middle/up/down/etc. */ - if (!inside_active_area) { + if (!inside_active_area) reset_hw_state(hw); - /* FIXME: if finger accidentally moves into the area and doesn't - * really release, the finger should remain down. */ - } - /* no edge or finger detection outside of area */ if (inside_active_area) { edge = edge_detection(priv, hw->x, hw->y); |