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 <ju...@tnx.nl> Reported-by: Juerd Waalboer <ju...@tnx.nl> Tested-by: Juerd Waalboer <ju...@tnx.nl> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- src/synaptics.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/synaptics.c b/src/synaptics.c index 24017bd..8064844 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -1408,6 +1408,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); -- 1.8.5.3 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel