From d77dec6971e4a0b306c8dbd5adf627908d7972cb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 19 Oct 2011 12:11:16 +1000 Subject: [PATCH] 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 Reviewed-by: Daniel Stone --- Xi/exevents.c | 1 + 1 file changed, 1 insertion(+) 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); }