summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-10-22 16:30:56 +0300
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-10-22 16:30:56 +0300
commitb1b3dbfd9b00d47c84c213bc6b7d61c5e8c80466 (patch)
treefada1c15ba07e3bccd36b8c57f9198f0551421cb
parent06ffd1e6b600d4e3f55ce7da69448a284ff5dac6 (diff)
DevicePresenceNotify: add deviceid field, with explanation
Add deviceid field, and an explanation of same in XInput.h. deviceid is only used if a specific device changed, and control is non-zero if a specific control on that device changed.
-rw-r--r--XInput.h13
-rw-r--r--XIproto.h4
2 files changed, 13 insertions, 4 deletions
diff --git a/XInput.h b/XInput.h
index 528e442..e4066b1 100644
--- a/XInput.h
+++ b/XInput.h
@@ -426,10 +426,14 @@ typedef struct {
/*******************************************************************
*
* DevicePresenceNotify event. This event is sent when the list of
- * input devices changes. No information about the change is
- * contained in this event, the client should use XListInputDevices()
- * to learn what has changed.
+ * input devices changes, in which case devchange will be false, and
+ * no information about the change will be contained in the event;
+ * the client should use XListInputDevices() to learn what has changed.
*
+ * If devchange is true, an attribute that the server believes is
+ * important has changed on a device, and the client should use
+ * XGetDeviceControl to examine the device. If control is non-zero,
+ * then that control has changed meaningfully.
*/
typedef struct {
@@ -439,6 +443,9 @@ typedef struct {
Display *display; /* Display the event was read from */
Window window; /* unused */
Time time;
+ Bool devchange;
+ XID deviceid;
+ XID control;
} XDevicePresenceNotifyEvent;
/*******************************************************************
diff --git a/XIproto.h b/XIproto.h
index 139d828..e3c6d6b 100644
--- a/XIproto.h
+++ b/XIproto.h
@@ -1600,7 +1600,9 @@ typedef struct
BYTE pad00;
CARD16 sequenceNumber B16;
Time time B32;
- CARD32 pad01 B32;
+ BYTE devchange;
+ BYTE deviceid;
+ CARD16 control B16;
CARD32 pad02 B32;
CARD32 pad03 B32;
CARD32 pad04 B32;