summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2010-12-13 19:49:58 +0000
committerDaniel Stone <daniel@fooishbar.org>2010-12-14 11:51:27 +0000
commit9419fe9f0b21232d342885a693fbf9222b5844e4 (patch)
tree3610e78c6f946698206e5f79f2068021beb6351e
parent549dd5f470148df74e65ce7bb1af316a2848a71d (diff)
WireToEvent: Set display member of all events as well
All events were getting random uninitialised garbage for display; fix that. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
-rw-r--r--src/XExtInt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/XExtInt.c b/src/XExtInt.c
index eed6637..f96e3ff 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -1347,6 +1347,7 @@ wireToDeviceEvent(xXIDeviceEvent *in, XGenericEventCookie* cookie)
cookie->data = ptr_lib = malloc(len);
out = next_block(&ptr_lib, sizeof(XIDeviceEvent));
+ out->display = cookie->display;
out->type = in->type;
out->extension = in->extension;
out->evtype = in->evtype;
@@ -1546,6 +1547,7 @@ wireToDeviceChangedEvent(xXIDeviceChangedEvent *in, XGenericEventCookie *cookie)
cookie->data = out = malloc(sizeof(XIDeviceChangedEvent) + len);
out->type = in->type;
+ out->display = cookie->display;
out->extension = in->extension;
out->evtype = in->evtype;
out->send_event = ((in->type & 0x80) != 0);
@@ -1575,6 +1577,7 @@ wireToHierarchyChangedEvent(xXIHierarchyEvent *in, XGenericEventCookie *cookie)
cookie->data = out = malloc(sizeof(XIHierarchyEvent) + in->num_info * sizeof(XIHierarchyInfo));;
out->info = (XIHierarchyInfo*)&out[1];
+ out->display = cookie->display;
out->type = in->type;
out->extension = in->extension;
out->evtype = in->evtype;
@@ -1617,6 +1620,7 @@ wireToRawEvent(xXIRawEvent *in, XGenericEventCookie *cookie)
out = next_block(&ptr, sizeof(XIRawEvent));
out->type = in->type;
+ out->display = cookie->display;
out->extension = in->extension;
out->evtype = in->evtype;
out->send_event = ((in->type & 0x80) != 0);
@@ -1660,6 +1664,7 @@ wireToEnterLeave(xXIEnterEvent *in, XGenericEventCookie *cookie)
out->buttons.mask = (unsigned char*)&out[1];
out->type = in->type;
+ out->display = cookie->display;
out->extension = in->extension;
out->evtype = in->evtype;
out->send_event = ((in->type & 0x80) != 0);