dix: Add a deviceid to the DeviceChangedEvent.

ChangeDeviceId would actually overwrite the flags field if deviceid wasn't
present. Aside from the event of course not telling which device generated
it in the first place.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-05-21 08:29:14 +10:00
parent eeffb83fea
commit d79318f269
2 changed files with 2 additions and 0 deletions

View File

@ -195,6 +195,7 @@ CreateClassesChangedEvent(EventList* event,
dce = (DeviceChangedEvent*)event->event; dce = (DeviceChangedEvent*)event->event;
memset(dce, 0, sizeof(DeviceChangedEvent)); memset(dce, 0, sizeof(DeviceChangedEvent));
dce->deviceid = master->id;
dce->header = ET_Internal; dce->header = ET_Internal;
dce->length = sizeof(DeviceChangedEvent); dce->length = sizeof(DeviceChangedEvent);
dce->type = ET_DeviceChanged; dce->type = ET_DeviceChanged;

View File

@ -125,6 +125,7 @@ typedef struct
int type; /**< ET_DeviceChanged */ int type; /**< ET_DeviceChanged */
int length; /**< Length in bytes */ int length; /**< Length in bytes */
Time time; /**< Time in ms */ Time time; /**< Time in ms */
int deviceid; /**< Device whose capabilities have changed */
int flags; /**< Mask of ::HAS_OLD_SLAVE or ::HAS_NEW_SLAVE */ int flags; /**< Mask of ::HAS_OLD_SLAVE or ::HAS_NEW_SLAVE */
/** If flags & HAS_OLD_SLAVE is set, old_slaveid specifies SD previously /** If flags & HAS_OLD_SLAVE is set, old_slaveid specifies SD previously
* attached to this device. */ * attached to this device. */