From: Chris Bagwell <ch...@cnpbagwell.com>

Changed !type check to type == EV_SYN to make it clear what its doing.

Signed-off-by: Chris Bagwell <ch...@cnpbagwell.com>
Reviewed by: Ping Cheng <pingli...@gmail.com>
---
 src/wcmUSB.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/wcmUSB.c b/src/wcmUSB.c
index 77236c4..c8d775f 100644
--- a/src/wcmUSB.c
+++ b/src/wcmUSB.c
@@ -936,6 +936,13 @@ static void usbParseEvent(InputInfoPtr pInfo,
                goto skipEvent;
        }
 
+       /* ignore sync windows that contain no data */
+       if (private->wcmEventCnt == 1 &&
+           private->wcmEvents->type == EV_SYN) {
+               DBG(6, common, "no real events received\n");
+               goto skipEvent;
+       }
+
        /* dispatch all queued events */
        usbDispatchEvents(pInfo);
 
@@ -1206,11 +1213,6 @@ static void usbDispatchEvents(InputInfoPtr pInfo)
 
        DBG(6, common, "%d events received\n", private->wcmEventCnt);
 
-       if (private->wcmEventCnt == 1 && !private->wcmEvents->type) {
-               DBG(6, common, "no real events received\n");
-               return;
-       }
-
        channel = usbChooseChannel(common);
 
        /* couldn't decide channel? invalid data */
-- 
1.7.3.1


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to