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 /include/eventstr.h | |
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 'include/eventstr.h')
-rw-r--r-- | include/eventstr.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/include/eventstr.h b/include/eventstr.h index b7611a5b1..8dd98be5f 100644 --- a/include/eventstr.h +++ b/include/eventstr.h @@ -120,9 +120,8 @@ struct _DeviceEvent }; -/* Flags used in DeviceChangedEvent to signal if new/old slave is present. */ -#define DEVCHANGE_HAS_OLD_SLAVE 0x1 -#define DEVCHANGE_HAS_NEW_SLAVE 0x2 +/* Flags used in DeviceChangedEvent to signal if the slave has changed */ +#define DEVCHANGE_SLAVE_SWITCH 0x2 /* Flags used in DeviceChangedEvent to signal whether the event was a * pointer event or a keyboard event */ #define DEVCHANGE_POINTER_EVENT 0x4 @@ -140,14 +139,10 @@ struct _DeviceChangedEvent int length; /**< Length in bytes */ Time time; /**< Time in ms */ int deviceid; /**< Device whose capabilities have changed */ - int flags; /**< Mask of ::HAS_OLD_SLAVE, ::HAS_NEW_SLAVE, + int flags; /**< Mask of ::HAS_NEW_SLAVE, ::POINTER_EVENT, ::KEYBOARD_EVENT */ - /** If flags & HAS_OLD_SLAVE is set, old_slaveid specifies SD previously - * attached to this device. */ - int old_slaveid; - /** If flags & HAS_NEW_SLAVE is set, new_slaveid specifies device now - * attached to this device. */ - int new_slaveid; + int masterid; /**< MD when event was generated */ + int sourceid; /**< The device that caused the change */ struct { int num_buttons; /**< Number of buttons */ |