On 01/31/11 02:46 AM, Rami Ylimäki wrote: > It's sometimes impossible to know in advance whether an X client is > using Xlib from multiple threads or not. For example, there could be > some generic X client that acts as a plugin container. Plugins could > be loaded to the container at runtime, but the container doesn't know > whether the plugins are using Xlib from a separate thread or not.
I don't know if it's a better answer, but an alternate solution we've been carrying around in Solaris libX11 since long before I got here is to allow XInitThreads() to be called by other plugins/libraries even after the X connection is up and running. I've not checked how well it works in the current world where half of XlibInt.c was ripped out and replaced by xcb calls, but the code is available if someone wants to look at it. Original version: http://people.freedesktop.org/~alanc/thread-fixes/ Current version: http://src.opensolaris.org/source/xref/x-cons/xnv-clone/open-src/lib/libX11/1234757.patch http://src.opensolaris.org/source/xref/x-cons/xnv-clone/open-src/lib/libX11/4010755.patch -- -Alan Coopersmith- [email protected] Oracle Solaris Platform Engineering: X Window System _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
