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);
+                       }
                }
        } /* 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

Reply via email to