[PATCH xserver 3/3] Xi: swap touchid for xXIAllowEventsReq

Peter Hutterer peter.hutterer at who-t.net
Thu Jan 26 21:50:47 PST 2012


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 Xi/xiallowev.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/Xi/xiallowev.c b/Xi/xiallowev.c
index aadcf62..95eef40 100644
--- a/Xi/xiallowev.c
+++ b/Xi/xiallowev.c
@@ -52,7 +52,12 @@ SProcXIAllowEvents(ClientPtr client)
     swaps(&stuff->length);
     swaps(&stuff->deviceid);
     swapl(&stuff->time);
-    /* FIXME swap touchid */
+
+    if (stuff->length >= 4) /* XI 2.2+ has touchid */
+    {
+        uint32_t *touchid = (uint32_t*)&stuff[1];
+        swapl(touchid);
+    }
 
     return ProcXIAllowEvents(client);
 }
-- 
1.7.7.5



More information about the xorg-devel mailing list