summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-02-25 16:04:16 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-02-25 17:08:14 +1000
commit62858c426e6de1b99df660251737233afd335302 (patch)
tree7ee19b3435c5d588262072513149051d64baf42b
parentcbdc33d903ec6f90a42ec3c31905eeaef9ecf0a2 (diff)
Remove AttachClass handling from ListDevices.
If you want attachment information, use XI2 and XQueryDevice(). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--include/X11/extensions/XInput.h18
-rw-r--r--src/XListDev.c15
2 files changed, 1 insertions, 32 deletions
diff --git a/include/X11/extensions/XInput.h b/include/X11/extensions/XInput.h
index cdbbb8e..24b4606 100644
--- a/include/X11/extensions/XInput.h
+++ b/include/X11/extensions/XInput.h
@@ -891,24 +891,6 @@ typedef struct _XValuatorInfo
XAxisInfoPtr axes;
} XValuatorInfo;
-/**
- * Fake class, added to each device when parsing XListInputDevices internally.
- * Indicates the master device this device is attached to. If the device is a
- * master device, the value of attached is to be ignored.
- */
-typedef struct _XAttachInfo
- {
-#if defined(__cplusplus) || defined(c_plusplus)
- XID c_class;
-#else
- XID class;
-#endif
- int length;
- unsigned char attached;
- } XAttachInfo;
-
-typedef struct _XAttachInfo *XAttachInfoPtr;
-
/*******************************************************************
*
* An XDevice structure is returned by the XOpenDevice function.
diff --git a/src/XListDev.c b/src/XListDev.c
index 458fa43..292aae5 100644
--- a/src/XListDev.c
+++ b/src/XListDev.c
@@ -200,11 +200,6 @@ XListInputDevices(
sav_any = any;
for (i = 0; i < *ndevices; i++, list++) {
size += SizeClassInfo(&any, (int)list->num_classes);
- /* Thanks to Xlibs braindead abstraction of XListInputDevices we
- * have to fake up a new class to indicate attachment, otherwise
- * we need to break the ABI. Each device has such a class.
- */
- size += sizeof(XAttachInfo);
}
for (i = 0, nptr = (char *)any; i < *ndevices; i++) {
@@ -228,18 +223,10 @@ XListInputDevices(
clist->type = list->type;
clist->id = list->id;
clist->use = list->use;
- clist->num_classes = list->num_classes + 1; /*fake attach class */
+ clist->num_classes = list->num_classes;
clist->inputclassinfo = Any;
ParseClassInfo(&any, &Any, (int)list->num_classes);
-
- /* Insert fake AttachInfo class */
- {
- ((XAttachInfoPtr)Any)->length = sizeof(XAttachInfo);
- ((XAttachInfoPtr)Any)->class = AttachClass;
- ((XAttachInfoPtr)Any)->attached = list->attached;
- Any = (XAnyClassPtr) ((char *)Any + Any->length);
- }
}
clist = sclist;