summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-05-14 12:09:38 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-05-14 12:13:45 +1000
commit4cc6992b08b6c7aed0d1242e3382fb53d51a0fe2 (patch)
tree05d3c8f189e3b3c7f05840510c90c61930007d9e
parentd041f30777c09f07ac79fface61bfbfa654306f2 (diff)
XIQueryPointer needs to include sensible button/modifier state.
This includes shuffling the xXIModifierInfo and xXIGroupInfo structs to the common structs section.
-rw-r--r--XI2proto.h57
-rw-r--r--XI2proto.txt12
2 files changed, 40 insertions, 29 deletions
diff --git a/XI2proto.h b/XI2proto.h
index 4b808ef..0ef0ece 100644
--- a/XI2proto.h
+++ b/XI2proto.h
@@ -194,6 +194,30 @@ typedef struct {
uint16_t mask_len; /**< Length of mask in 4 byte units */
} xXIEventMask;
+/**
+ * XKB modifier information.
+ * The effective modifier is a binary mask of base, latched, and locked
+ * modifiers.
+ */
+typedef struct
+{
+ uint32_t base_mods; /**< Logically pressed modifiers */
+ uint32_t latched_mods; /**< Logically latched modifiers */
+ uint32_t locked_mods; /**< Logically locked modifiers */
+} xXIModifierInfo;
+
+/**
+ * XKB group information.
+ * The effective group is the mathematical sum of base, latched, and locked
+ * group after group wrapping is taken into account.
+ */
+typedef struct
+{
+ uint8_t base_group; /**< Logically "pressed" group */
+ uint8_t latched_group; /**< Logically latched group */
+ uint8_t locked_group; /**< Logically locked group */
+ uint8_t pad0;
+} xXIGroupInfo;
/*************************************************************************************
@@ -304,13 +328,13 @@ typedef struct {
FP1616 root_y;
FP1616 win_x;
FP1616 win_y;
- uint16_t mask;
- uint16_t deviceid;
uint8_t same_screen;
uint8_t pad0;
- uint16_t pad1;
+ uint16_t buttons_len;
+ xXIModifierInfo mods;
+ xXIGroupInfo group;
} xXIQueryPointerReply;
-#define sz_xXIQueryPointerReply 40
+#define sz_xXIQueryPointerReply 52
/**
* @struct xXIWarpPointerReq
@@ -830,31 +854,6 @@ typedef struct
* Default input event for pointer or keyboard input.
*/
-/**
- * XKB modifier information.
- * The effective modifier is a binary mask of base, latched, and locked
- * modifiers.
- */
-typedef struct
-{
- uint32_t base_mods; /**< Logically pressed modifiers */
- uint32_t latched_mods; /**< Logically latched modifiers */
- uint32_t locked_mods; /**< Logically locked modifiers */
-} xXIModifierInfo;
-
-/**
- * XKB group information.
- * The effective group is the mathematical sum of base, latched, and locked
- * group after group wrapping is taken into account.
- */
-typedef struct
-{
- uint8_t base_group; /**< Logically "pressed" group */
- uint8_t latched_group; /**< Logically latched group */
- uint8_t locked_group; /**< Logically locked group */
- uint8_t pad0;
-} xXIGroupInfo;
-
typedef struct
{
uint8_t type; /**< Always GenericEvent */
diff --git a/XI2proto.txt b/XI2proto.txt
index 3287c48..3122387 100644
--- a/XI2proto.txt
+++ b/XI2proto.txt
@@ -379,6 +379,10 @@ XI2. Clients should ignore this data.
win_x: FP1616
win_y: FP1616
same_screen: BOOL
+ mods: MODIFIERINFO
+ group: GROUPINFO
+ buttons_len: CARD16
+ buttons: SETofBUTTONMASK
└───
Query a master pointer device for its current position.
@@ -395,6 +399,14 @@ XI2. Clients should ignore this data.
Pointer position relative to 'window' or 0 if 'same_screen' is false.
same_screen
TRUE if 'window' is on the same screen as the pointer.
+ mods
+ XKB modifier state on the paired device.
+ group
+ XKB group state on the paired device.
+ buttons_len
+ The length of 'buttons' in 4 byte units.
+ buttons
+ Button state.
┌───
XIWarpPointer