summaryrefslogtreecommitdiff
path: root/include/events.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-05-20 10:55:03 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-05-22 15:44:57 +1000
commitebe45e1a72a81ad22413e5d0514869b3e45a69b7 (patch)
tree3932faf98c84b604e123b7e12a00cce52a4c4bb0 /include/events.h
parentbc63c8a4570c989f19a036965854bceb9800ce19 (diff)
input: introduce partial class copying depending on the event.
Copying all classes into the master device has drawbacks for hybrid devices (devices that are both mice and keyboards). If such a device posts an event, it's key classes are moved into the VCP. The key event itself is unaffected by keyboard grabs and the like. Partial class copying copies depending on the event and copies the classes into the right master device (i.e. the VCK for key events, the VCP for pointer events). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'include/events.h')
-rw-r--r--include/events.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/events.h b/include/events.h
index cc5092ee4..d44188b67 100644
--- a/include/events.h
+++ b/include/events.h
@@ -115,6 +115,10 @@ typedef struct
/* 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 whether the event was a
+ * pointer event or a keyboard event */
+#define DEVCHANGE_POINTER_EVENT 0x4
+#define DEVCHANGE_KEYBOARD_EVENT 0x8
/**
* Sent whenever a device's capabilities have changed.
@@ -126,7 +130,8 @@ typedef struct
int length; /**< Length in bytes */
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, ::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;