diff options
author | Joe Shaw <joe@joeshaw.org> | 2010-10-12 10:00:48 -0400 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-10-14 15:01:15 +1000 |
commit | e2260fef76b08f782ab5640ae490d9b2da33c94b (patch) | |
tree | 8ec0369a15179ce1b6466f21b43e230547d0be14 | |
parent | a7637b5b3782f6f7b8efadaa459e9e365701d88b (diff) |
don't post motion events if the finger state is FS_UNTOUCHED
Works around some buggy touchpads that report their position as things
like 0,0; 0,ymax; etc. at the same time as they turn off the finger
tool and/or touch indication. This is particularly a problem when
using the touchpad in absolute mode.
Signed-off-by: Joe Shaw <joe@joeshaw.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/synaptics.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/synaptics.c b/src/synaptics.c index a4445e9..b490009 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -2453,10 +2453,12 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw) } /* Post events */ - if (priv->absolute_events && inside_active_area) { - xf86PostMotionEvent(pInfo->dev, 1, 0, 2, hw->x, hw->y); - } else if (dx || dy) { - xf86PostMotionEvent(pInfo->dev, 0, 0, 2, dx, dy); + if (finger > FS_UNTOUCHED) { + if (priv->absolute_events && inside_active_area) { + xf86PostMotionEvent(pInfo->dev, 1, 0, 2, hw->x, hw->y); + } else if (dx || dy) { + xf86PostMotionEvent(pInfo->dev, 0, 0, 2, dx, dy); + } } if (priv->mid_emu_state == MBE_LEFT_CLICK) |