summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-06-08 14:21:58 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-06-09 10:56:35 +1000
commit467bfbc6598c8c30ab9b703160cc42ae82e75f1c (patch)
tree35d465718b6b05a1c38f1c4fb507c0f826aa2dee
parent0254852c8fb0793401368c7afc6041f807ee1d87 (diff)
XIHierarchyEvent should list num_info, not num_devices.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--include/X11/extensions/XInput2.h2
-rw-r--r--src/XExtInt.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/include/X11/extensions/XInput2.h b/include/X11/extensions/XInput2.h
index 686783a..da80fa3 100644
--- a/include/X11/extensions/XInput2.h
+++ b/include/X11/extensions/XInput2.h
@@ -159,7 +159,7 @@ typedef struct {
int evtype; /* XI_DeviceHierarchyChangedNotify */
Time time;
int flags;
- int num_devices;
+ int num_info;
XIHierarchyInfo *info;
} XIHierarchyEvent;
diff --git a/src/XExtInt.c b/src/XExtInt.c
index b2890f9..7997392 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -971,18 +971,18 @@ wireToHierarchyChangedEvent(xXIHierarchyEvent *in, XIHierarchyEvent* out)
XIHierarchyInfo *info_out;
xXIHierarchyInfo *info_in;
- out->info = Xmalloc(in->num_devices * sizeof(XIHierarchyInfo));
+ out->info = Xmalloc(in->num_info * sizeof(XIHierarchyInfo));
out->type = in->type;
out->extension = in->extension;
out->evtype = in->evtype;
out->time = in->time;
out->flags = in->flags;
- out->num_devices = in->num_devices;
+ out->num_info = in->num_info;
info_out = out->info;
info_in = (xXIHierarchyInfo*)&in[1];
- for (i = 0; i < out->num_devices; i++, info_out++, info_in++)
+ for (i = 0; i < out->num_info; i++, info_out++, info_in++)
{
info_out->deviceid = info_in->deviceid;
info_out->attachment = info_in->attachment;