[PATCH v2 1/2] Xi: handle new XIAllowEvents request in inputproto 2.1.99.6

Peter Hutterer peter.hutterer at who-t.net
Tue Feb 7 08:00:51 PST 2012


grab_window and touchid were removed from the struct for ABI compatibility
reasons, we need to pull that in manually now.

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

diff --git a/Xi/xiallowev.c b/Xi/xiallowev.c
index 3e3b02e..8b88e67 100644
--- a/Xi/xiallowev.c
+++ b/Xi/xiallowev.c
@@ -109,8 +109,20 @@ ProcXIAllowEvents(ClientPtr client)
 	break;
     case XIRejectTouch:
     case XIAcceptTouch:
-        ret = TouchAcceptReject(client, dev, stuff->mode, stuff->touchid,
-                                stuff->grab_window, &client->errorValue);
+        {
+            int rc;
+            uint32_t *extra_data = (uint32_t*)&stuff;
+            uint32_t touchid = extra_data[0];
+            Window grab_window = extra_data[1];
+            WindowPtr win;
+
+            rc = dixLookupWindow(&win, grab_window, client, DixReadAccess);
+            if (rc != Success)
+                return rc;
+
+            ret = TouchAcceptReject(client, dev, stuff->mode, touchid,
+                                    grab_window, &client->errorValue);
+        }
         break;
     default:
 	client->errorValue = stuff->mode;
-- 
1.7.7.5



More information about the xorg-devel mailing list