summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2012-09-13 16:59:01 -0700
committerJason Gerecke <killertofu@gmail.com>2012-09-19 09:41:03 -0700
commit0fe7f800295a4b5bf074bca798cf8024fcb174ec (patch)
tree5d1a5ac1231fb301238071d01f40b22cebbe1380
parente604e4e6c69898920e27aeed5a772484d796562b (diff)
downloadxf86-input-wacom-0fe7f800295a4b5bf074bca798cf8024fcb174ec.tar.gz
Ignore out-of-prox events from unknown devices already out-of-prox
Fixes an issue with the Intuos5, which sends extra out-of-prox notifications when the ExpressKeys are touched. This causes the driver to ask the kernel for the tool currently in prox and post an empty event for it. The result is a cursor that (only while the pen is in prox) sometimes jumps to the top left when touching the buttons. We fix this by ignoring events that claim to be leaving prox when the tool is already supposedly out of prox. https://bugs.freedesktop.org/show_bug.cgi?id=54250 Reported-by: Timo Aaltonen <tjaalton@ubuntu.com> Signed-off-by: Jason Gerecke <killertofu@gmail.com>
-rw-r--r--src/wcmUSB.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wcmUSB.c b/src/wcmUSB.c
index f25116b..4fc186a 100644
--- a/src/wcmUSB.c
+++ b/src/wcmUSB.c
@@ -1657,6 +1657,11 @@ static void usbDispatchEvents(InputInfoPtr pInfo)
unsigned long keys[NBITS(KEY_MAX)] = { 0 };
int rc;
+ if (!ds->proximity) {
+ DBG(3, common, "Unknown out-of-prox device leaving prox. Ignoring.\n");
+ return;
+ }
+
/* Retrieve the type by asking a resend from the kernel */
rc = ioctl(common->fd, EVIOCGKEY(sizeof(keys)), keys);
if (rc == -1)