If we wait until we finish other verifications, we may miss PAD events since they will be filtered out if there are no motion events sent simultaneously.
Signed-off-by: Ping Cheng <pi...@wacom.com> --- src/wcmUSB.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/wcmUSB.c b/src/wcmUSB.c index 5e5e4e2..ef19b51 100644 --- a/src/wcmUSB.c +++ b/src/wcmUSB.c @@ -1657,7 +1657,21 @@ static void usbDispatchEvents(InputInfoPtr pInfo) */ if (common->wcmProtocolLevel == WCM_PROTOCOL_GENERIC) private->wcmBTNChannel = PAD_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[PAD_CHANNEL].dirty)) + { + DBG(10, common, "Dirty flag set on channel %d; " + "sending event.\n", PAD_CHANNEL); + common->wcmChannel[PAD_CHANNEL].dirty = FALSE; + wcmEvent(common, PAD_CHANNEL, + &common->wcmChannel[PAD_CHANNEL].work); + } } } /* 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