[PATCH] dix: extend IsPointerDevice check to valuator-only devices.

Peter Hutterer peter.hutterer at who-t.net
Mon Oct 12 20:15:05 PDT 2009


A device with valuators but no keys is definitely a pointer device and needs
to be attached to the VCP. Otherwise, the class copying happens on the VCK
and the VCP isn't updated with the events that are to be sent through it.
This addresses the trigger for #24441, not the actual issue.
Jury is still out on valuator+key devices.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/events.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dix/events.c b/dix/events.c
index 14e3900..aaf28b5 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -345,7 +345,9 @@ DevHasCursor(DeviceIntPtr pDev)
 Bool
 IsPointerDevice(DeviceIntPtr dev)
 {
-    return (dev->type == MASTER_POINTER) || (dev->valuator && dev->button);
+    return (dev->type == MASTER_POINTER) ||
+            (dev->valuator && dev->button) ||
+            (dev->valuator && !dev->key);
 }
 
 /*
-- 
1.6.3.rc1.2.g0164.dirty



More information about the xorg-devel mailing list