diff options
author | Peter Hutterer <peter.hutterer@redhat.com> | 2008-08-21 17:23:11 +0930 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@redhat.com> | 2008-08-22 21:38:01 +0930 |
commit | c696da75c7326c5e1f1cd48292c0519ddc22e11b (patch) | |
tree | a822e425de1ce23d64f39712e8b4b6c13e1285a9 /Xi/xiproperty.c | |
parent | 01264f17925005969c3b71ca945fc1014bcd8c8e (diff) |
Xi: swap devices property replies.
Diffstat (limited to 'Xi/xiproperty.c')
-rw-r--r-- | Xi/xiproperty.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c index ec1ed6c29..df93de5a6 100644 --- a/Xi/xiproperty.c +++ b/Xi/xiproperty.c @@ -888,3 +888,43 @@ SProcXGetDeviceProperty (ClientPtr client) return (ProcXGetDeviceProperty(client)); } + +/* Reply swapping */ + +void +SRepXListDeviceProperties(ClientPtr client, int size, + xListDevicePropertiesReply *rep) +{ + char n; + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->nAtoms, n); + /* properties will be swapped later, see ProcXListDeviceProperties */ + WriteToClient(client, size, (char*)rep); +} + +void +SRepXQueryDeviceProperty(ClientPtr client, int size, + xQueryDevicePropertyReply *rep) +{ + char n; + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + + WriteToClient(client, size, (char*)rep); +} + +void +SRepXGetDeviceProperty(ClientPtr client, int size, + xGetDevicePropertyReply *rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swapl(&rep->propertyType, n); + swapl(&rep->bytesAfter, n); + swapl(&rep->nItems, n); + /* data will be swapped, see ProcXGetDeviceProperty */ + WriteToClient(client, size, (char*)rep); +} |