Hi Peter, On Mon, Oct 11, 2010 at 9:11 PM, Joe Shaw <[email protected]> wrote: >> yes, I get x 0 and y <max> values in the same event that sets BTN_TOUCH >> to 0. which indicates a bug in the synaptics driver, we should just ignore >> that packet then. > > Ok, I will take a look at fixing that as well. I think there is some > similar code to deal with that in the evdev driver.
Attached a patch which discards motion events if the finger state is FS_UNTOUCHED. It would be the third patch in the series. Thanks! Joe
From 776a2c9773012e770080f65c32c6079de86cf974 Mon Sep 17 00:00:00 2001 From: Joe Shaw <[email protected]> Date: Tue, 12 Oct 2010 10:00:48 -0400 Subject: [PATCH] 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 <[email protected]> --- 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) -- 1.7.3.1
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
