summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-10-19 12:11:16 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-10-25 14:06:41 +1000
commitd77dec6971e4a0b306c8dbd5adf627908d7972cb (patch)
tree3076622955577669cf687627133ee62d0b43c09d
parente9dee21fa3213bfe87b2b728a38eb41d3ba0e664 (diff)
Xi: ensure the deviceid for DeviceChangedEvents is always the right one
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@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
-rw-r--r--Xi/exevents.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 2ae5a62eb..7afb69e24 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);
}