summaryrefslogtreecommitdiff
path: root/src/XExtInt.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-05-02 09:44:37 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-05-02 09:44:37 +0930
commitfe33724ed6cdaad6b13a7ca1c9f03dbb98d93982 (patch)
tree259115631cea0662bfe86946fee711cdb1faaa33 /src/XExtInt.c
parent44ccc08bb19d9d55fb9ff6bfb0592d5d79b9b712 (diff)
Add deviceid and ev-to-wire conversion for RawDeviceEvent.
Diffstat (limited to 'src/XExtInt.c')
-rw-r--r--src/XExtInt.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/XExtInt.c b/src/XExtInt.c
index 9b90711..9396da5 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -791,12 +791,17 @@ XInputWireToEvent(dpy, re, event)
raw_event->num_valuators = raw_wire->num_valuators;
raw_event->first_valuator = raw_wire->first_valuator;
raw_event->buttons = raw_wire->buttons;
+ raw_event->deviceid = raw_wire->deviceid;
if (raw_event->num_valuators)
{
+ int i;
+ CARD32* valptr;
raw_event->valuators =
(char*)calloc((raw_event->num_valuators), sizeof(int));
- memcpy(raw_event->valuators, &raw_wire->valuator0,
- raw_event->num_valuators * sizeof(CARD32));
+ valptr = &raw_wire->valuator0;
+ for (i = 0; i < raw_event->num_valuators; i++,
+ valptr++)
+ raw_event->valuators[i] = *valptr;
} else
raw_event->valuators = NULL;
*re = *save;