diff options
Diffstat (limited to 'Xi/xiquerydevice.c')
-rw-r--r-- | Xi/xiquerydevice.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c index 749bc24..85c1dd8 100644 --- a/Xi/xiquerydevice.c +++ b/Xi/xiquerydevice.c @@ -107,12 +107,13 @@ ProcXIQueryDevice(ClientPtr client) return BadAlloc; } - memset(&rep, 0, sizeof(xXIQueryDeviceReply)); - rep.repType = X_Reply; - rep.RepType = X_XIQueryDevice; - rep.sequenceNumber = client->sequence; - rep.length = len / 4; - rep.num_devices = 0; + rep = (xXIQueryDeviceReply) { + .repType = X_Reply, + .RepType = X_XIQueryDevice, + .sequenceNumber = client->sequence, + .length = len / 4, + .num_devices = 0 + }; ptr = info; if (dev) { @@ -162,7 +163,7 @@ SRepXIQueryDevice(ClientPtr client, int size, xXIQueryDeviceReply * rep) /* Device info is already swapped, see ProcXIQueryDevice */ - WriteToClient(client, size, (char *) rep); + WriteToClient(client, size, rep); } /** @@ -430,7 +431,7 @@ ListTouchInfo(DeviceIntPtr dev, xXITouchInfo * touch) { touch->type = XITouchClass; touch->length = sizeof(xXITouchInfo) >> 2; - touch->sourceid = touch->sourceid; + touch->sourceid = dev->touch->sourceid; touch->mode = dev->touch->mode; touch->num_touches = dev->touch->num_touches; |