<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div dir="ltr"><div dir="ltr"></div>On Mon, Oct 31, 2022 at 8:46 PM Po Lu <<a href="mailto:luangruo@yahoo.com" target="_blank">luangruo@yahoo.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Adam Jackson <<a href="mailto:ajax@redhat.com" target="_blank">ajax@redhat.com</a>> writes:<br>
<br>
> Because XInitThreads only works if it is called before XOpenDisplay.<br>
<br>
So why not fix that?<br>
<br>
I think the simple fix would be to call _XInitDisplayLock in<br>
XGetXCBConnection.<br></blockquote><div><br></div>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.</div><div class="gmail_quote"><br></div><div class="gmail_quote">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.</div><div class="gmail_quote"><br></div><div class="gmail_quote">- ajax<br></div></div></div>
</div></div>