[PATCH 4/6] Xi: ensure the deviceid for DeviceChangedEvents is always the right one

Peter Hutterer peter.hutterer at who-t.net
Wed Oct 19 23:25:44 PDT 2011


If we're sending the event for a given device, make sure the deviceid is
that of the device.
This allows callers to use the same DCE for slave and master without having
to fiddle the DCE's internal fields.

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

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 2ae5a62..7afb69e 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -699,6 +699,7 @@ ChangeMasterDeviceClasses(DeviceIntPtr device, DeviceChangedEvent *dce)
 
     /* FIXME: the classes may have changed since we generated the event. */
     DeepCopyDeviceClasses(slave, device, dce);
+    dce->deviceid = device->id;
     XISendDeviceChangedEvent(device, dce);
 }
 
-- 
1.7.6.4



More information about the xorg-devel mailing list