Fwd: XInitThreads in library constructor breaks Motif!

Adam Jackson ajax at redhat.com
Tue Nov 1 17:25:06 UTC 2022


On Mon, Oct 31, 2022 at 8:46 PM Po Lu <luangruo at yahoo.com> wrote:

> Adam Jackson <ajax at redhat.com> writes:
>
> > Because XInitThreads only works if it is called before XOpenDisplay.
>
> So why not fix that?
>
> I think the simple fix would be to call _XInitDisplayLock in
> XGetXCBConnection.
>

That wouldn't be sufficient, off the top of my head there's library-global
state that gets set up in XInitThreads too and none of the display-level
locking will work without it.

Again, I proposed a workaround that preserves the thread-safety guarantee I
need, and wrote the patch implementing it. Sure would be nice if someone
tested it.

- ajax
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg-devel/attachments/20221101/b8fba196/attachment.htm>


More information about the xorg-devel mailing list