OK, so following on posts about XInitThreads and OpenGl components used multi-threaded, here’s the upshot.
X Display Connections really aren’t thread safe, even with XInitThreads correctly initializing. They won’t crash if used across threads, but will throw a lot of std out messages and warnings, and hang on exit.
Meanwhile, a GLX context (OpenGL on Linux) created on one display connection will only work with that same connection.
The built-in OpenGLComponent is hard-wired to use the global display connection. This is fine and probably correct for normal use, but if you start to use the context on another thread, bad things start to happen.
So - I can skip the built-in component, which is sad as it works well and plays well with others, or try to patch it for Linux use, which will involve changes in Linux_Windowing.cpp that may apply to the OpenGLComponent. In essence, anything that will be used in a thread needs it’s own Display Connection, and possibly the connection needs to be protected. Any thoughts?