[PATCH libXi] WireToEvent: Set display member of all events as well
Jeremy Huddleston
jeremyhu at apple.com
Mon Dec 13 11:56:46 PST 2010
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
On Dec 13, 2010, at 11:51, Daniel Stone wrote:
> All events were getting random uninitialised garbage for display; fix
> that.
>
> Signed-off-by: Daniel Stone <daniel at fooishbar.org>
> ---
> src/XExtInt.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/src/XExtInt.c b/src/XExtInt.c
> index a1ade31..9f995b6 100644
> --- a/src/XExtInt.c
> +++ b/src/XExtInt.c
> @@ -1357,6 +1357,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;
> @@ -1591,6 +1592,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);
> @@ -1620,6 +1622,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;
> @@ -1662,6 +1665,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);
> @@ -1705,6 +1709,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);
> --
> 1.7.2.3
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
More information about the xorg-devel
mailing list