[PATCH] dix: don't update the slave coordinates from the VCK.

Peter Hutterer peter.hutterer at who-t.net
Mon Jan 4 19:46:07 PST 2010


A keyboard event from a device with both valuators and keys will be posted
through the VCK. In this case, do not update the slave device coordinates
from the VCK - they're always 0/0. Leave them as-is, for the next pointer
event will continue where it left.

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

diff --git a/dix/getevents.c b/dix/getevents.c
index 2df32e8..85518b2 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -630,9 +630,12 @@ updateFromMaster(EventListPtr events, DeviceIntPtr dev, int type, int *num_event
     if (master && master->last.slave != dev)
     {
         CreateClassesChangedEvent(events, master, dev, type);
-        updateSlaveDeviceCoords(master, dev);
-        master->last.slave = dev;
-        master->last.numValuators = dev->last.numValuators;
+        if (IsPointerDevice(master))
+        {
+            updateSlaveDeviceCoords(master, dev);
+            master->last.slave = dev;
+            master->last.numValuators = dev->last.numValuators;
+        }
         (*num_events)++;
         events++;
     }
-- 
1.6.5.2



More information about the xorg-devel mailing list