On Thu, Dec 13, 2012 at 2:18 PM, Ping Cheng <pingli...@gmail.com> wrote:

> If we wait until we finish other verifications, we could miss
> PAD events since they will be filtered out when there are no
> motion events sent simultaneously.
>


> Signed-off-by: Ping Cheng <pingli...@gmail.com>
> Acked-by: Jason Gerecke <killert...@gmail.com>
> ---
>  src/wcmUSB.c |   13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/src/wcmUSB.c b/src/wcmUSB.c
> index 0ea2093..f15a6a2 100644
> --- a/src/wcmUSB.c
> +++ b/src/wcmUSB.c
> @@ -1655,6 +1655,19 @@ static void usbDispatchEvents(InputInfoPtr pInfo)
>                 {
>                         usbParseKeyEvent(common, event, channel);
>                         usbParseBTNEvent(common, event,
> private->wcmBTNChannel);
> +
> +                       /* send PAD events now for generic devices.
> Otherwise,
> +                        * they are filtered out when there are no motion
> events.
> +                        */
> +                       if ((common->wcmProtocolLevel ==
> WCM_PROTOCOL_GENERIC)
> +                           &&
> (common->wcmChannel[private->wcmBTNChannel].dirty))
> +                        {
> +                               DBG(10, common, "Dirty flag set on channel
> %d; "
> +                                   "sending event.\n",
> private->wcmBTNChannel);
> +
> common->wcmChannel[private->wcmBTNChannel].dirty = FALSE;
> +                               wcmEvent(common, private->wcmBTNChannel,
> +
>  &common->wcmChannel[private->wcmBTNChannel].work);
> +                       }
>


I don't understand this one.  How are they "filtered" out?  Is
usbDispatchEvents() returning early or is it some other function?

I can tell from the if() that its a Generic device... which one though?

I suspect the events get ignored because we are not initlizing the ds
structure correctly.  I'd prefer to get that resolved instead of
duplicating logic in two places.  Or if we decide this route is
best/easiest then I'd prefer if we at least move all Button processing
earlier and then at the for() loop below we skip over button channel always.

Chris

                }
>         } /* next event */
>
> --
> 1.7.10.4
>
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> Linuxwacom-devel mailing list
> Linuxwacom-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to