On Wed, Jan 5, 2011 at 11:00 PM, Peter Hutterer
<[email protected]> wrote:
> If we're going out of proximity, don't post an event.
>
> Signed-off-by: Peter Hutterer <[email protected]>
> ---
> src/wcmCommon.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/src/wcmCommon.c b/src/wcmCommon.c
> index 0b89c0c..93837f7 100644
> --- a/src/wcmCommon.c
> +++ b/src/wcmCommon.c
> @@ -402,7 +402,8 @@ static int getWheelButton(InputInfoPtr pInfo, const
> WacomDeviceState* ds,
> }
>
> /* emulate events for absolute wheel when it is a touch ring (on pad)
> */
> - if ( (ds->abswheel != priv->oldWheel) && IsPad(priv) )
> + if ( (ds->abswheel != priv->oldWheel) && IsPad(priv) &&
> + (priv->oldProximity == ds->proximity))
This assumes that we have out-prox event for pad. For generic devices,
pad is considered as always in-prox.
Another idea comes up when I read this patch. For both ring and
strips, the time that we want to post an event is when the finger
moved on the ring or strip in a direction. If it stays at or touches
one point then leaves, the value below can be non-zero. But we can not
post an event since there is no movement on the surface involved. This
case could happen if ds->abswheel = 0 (leaving) or priv->oldWheel = 0
(touching). A check to !ds->abswheel && !priv->oldWheel need to be
added to the above if-statement. priv->oldStripX/Y and ds->stripx/y
need to be considered for patch 5/5.
> {
> value = priv->oldWheel - ds->abswheel;
> fakeButton = (value > 0) ? priv->wheelup : priv->wheeldn;
value = 0 should not post events.
The other patches look good. Thank you.
Ping
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel