XInitThreads () as per man pages

man XInitThreads says:

It is only necessary to call this function if multiple
threads might use Xlib concurrently.

I don’t see anything in there that says that having a separate X
connection allows you to bypass the call to XInitThreads.

It does.
The problem is happening because the main thread and the event thread
are both using SDL_Display() – or you are performing graphics updates
from the event thread. The latter is more likely because the former
has been thoroughly tested. :slight_smile:

-Sam Lantinga				(slouken at

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec