xserver: Branch 'master' - 2 commits
Peter Hutterer
whot at kemper.freedesktop.org
Fri Aug 22 05:09:04 PDT 2008
Xi/extinit.c | 9 +++++++--
Xi/xiproperty.c | 40 ++++++++++++++++++++++++++++++++++++++++
Xi/xiproperty.h | 9 +++++++++
3 files changed, 56 insertions(+), 2 deletions(-)
New commits:
commit 95b466e457542bfe08b0ed2bbb5db8d28a961cfd
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date: Thu Aug 21 17:24:40 2008 +0930
Xi: don't include .c files.
diff --git a/Xi/extinit.c b/Xi/extinit.c
index ef0a069..cb1f3a4 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -105,7 +105,7 @@ SOFTWARE.
#include "gtmotion.h"
#include "listdev.h"
#include "opendev.h"
-#include "qryacces.c"
+#include "qryacces.h"
#include "querydp.h"
#include "queryst.h"
#include "selectev.h"
@@ -122,7 +122,6 @@ SOFTWARE.
#include "ungrdevk.h"
#include "warpdevp.h"
#include "xiselev.h"
-#include "xiproperty.c"
#include "xiproperty.h"
commit c696da75c7326c5e1f1cd48292c0519ddc22e11b
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date: Thu Aug 21 17:23:11 2008 +0930
Xi: swap devices property replies.
diff --git a/Xi/extinit.c b/Xi/extinit.c
index 979622f..ef0a069 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -478,6 +478,12 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep)
else if (rep->RepType == X_ChangeDeviceControl)
SRepXChangeDeviceControl(client, len,
(xChangeDeviceControlReply *) rep);
+ else if (rep->RepType == X_ListDeviceProperties)
+ SRepXListDeviceProperties(client, len, (xListDevicePropertiesReply*)rep);
+ else if (rep->RepType == X_QueryDeviceProperty)
+ SRepXQueryDeviceProperty(client, len, (xQueryDevicePropertyReply*)rep);
+ else if (rep->RepType == X_GetDeviceProperty)
+ SRepXGetDeviceProperty(client, len, (xGetDevicePropertyReply *) rep);
else if (rep->RepType == X_QueryDevicePointer)
SRepXQueryDevicePointer(client, len,
(xQueryDevicePointerReply *) rep);
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index ec1ed6c..df93de5 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);
+}
diff --git a/Xi/xiproperty.h b/Xi/xiproperty.h
index 47ba0ea..11af4bc 100644
--- a/Xi/xiproperty.h
+++ b/Xi/xiproperty.h
@@ -33,6 +33,7 @@ int ProcXChangeDeviceProperty (ClientPtr client);
int ProcXDeleteDeviceProperty (ClientPtr client);
int ProcXGetDeviceProperty (ClientPtr client);
+/* request swapping */
int SProcXListDeviceProperties (ClientPtr client);
int SProcXQueryDeviceProperty (ClientPtr client);
int SProcXConfigureDeviceProperty (ClientPtr client);
@@ -40,6 +41,14 @@ int SProcXChangeDeviceProperty (ClientPtr client);
int SProcXDeleteDeviceProperty (ClientPtr client);
int SProcXGetDeviceProperty (ClientPtr client);
+/* reply swapping */
+void SRepXListDeviceProperties(ClientPtr client, int size,
+ xListDevicePropertiesReply *rep);
+void SRepXQueryDeviceProperty(ClientPtr client, int size,
+ xQueryDevicePropertyReply *rep);
+void SRepXGetDeviceProperty(ClientPtr client, int size,
+ xGetDevicePropertyReply *rep);
+
void XIInitKnownProperties(void);
#endif /* XIPROPERTY_C */
More information about the xorg-commit
mailing list