diff options
-rw-r--r-- | include/X11/extensions/XInput2.h | 2 | ||||
-rw-r--r-- | src/XExtInt.c | 6 |
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; |