diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-08-11 16:27:40 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-08-17 13:25:35 +1000 |
commit | 2851f04cb2f6e5c30267f733d867c86d4e69a485 (patch) | |
tree | 561a48049c8767749c7f67133fee59d2501e0142 /dix/getevents.c | |
parent | c1d901d723c3bee523736eacc15b44a7dff484fe (diff) |
dix: rework DeviceChangedEvents a bit.
DCEs are now processed when sent throught the master device, not when sent
through the slave device. This includes a removal of some un-used (or partly
used) fields in the DCE itself to something more self-explanatory.
TODO: if a device has events queued and its attachment is changed, the DCE
is silently dropped now. Instead, it should be generated as soon as the
first event after the attachment is sent.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix/getevents.c')
-rw-r--r-- | dix/getevents.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/dix/getevents.c b/dix/getevents.c index 5f0095430..2912c1e85 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -193,19 +193,15 @@ CreateClassesChangedEvent(EventList* event, dce = (DeviceChangedEvent*)event->event; memset(dce, 0, sizeof(DeviceChangedEvent)); - dce->deviceid = master->id; + dce->deviceid = slave->id; + dce->masterid = master->id; dce->header = ET_Internal; dce->length = sizeof(DeviceChangedEvent); dce->type = ET_DeviceChanged; dce->time = ms; dce->flags = type; - if (master->last.slave) - { - dce->flags |= DEVCHANGE_HAS_OLD_SLAVE; - dce->old_slaveid = master->last.slave->id; - } - dce->flags |= DEVCHANGE_HAS_NEW_SLAVE; - dce->new_slaveid = slave->id; + dce->flags |= DEVCHANGE_SLAVE_SWITCH; + dce->sourceid = slave->id; if (slave->button) { |