[PATCH] dix: FakeClientID for implicit passive grabs

Keith Packard keithp at keithp.com
Tue Nov 27 11:30:33 PST 2012


Peter Hutterer <peter.hutterer at who-t.net> writes:

> Using client->clientAsMask as resource for implicit passive grabs causes
> resource conflict with client-allocated resources. Freeing the passive grab
> frees all resources with that ID, so arbitrary resources can get freed while
> still in use. This causes random crashes.

Oh, another question -- I can't see any possible way a window resource
ID in a TouchListener wouldn't reference the window pointer which is
already present. If so, RetrieveTouchDeliveryData could be further
simplified:

@@ -1315,15 +1315,7 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
         *mask = (*grab)->xi2mask;
     }
     else {
-        if (listener->level == CORE)
-            rc = dixLookupWindow(win, listener->listener,
-                                 serverClient, DixSendAccess);
-        else
-            rc = dixLookupResourceByType((pointer *) win, listener->listener,
-                                         RT_INPUTCLIENT,
-                                         serverClient, DixSendAccess);
-        if (rc != Success)
-            return FALSE;
+        *win = listener->window;
 
         if (listener->level == XI2) {
             int evtype;

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20121127/bd4e0e98/attachment.pgp>


More information about the xorg-devel mailing list