imagej / imagej-launcher

The ImageJ native launcher
https://imagej.net/learn/launcher
BSD 2-Clause "Simplified" License
21 stars 23 forks source link

Add call to XInitThreads on Linux before any GUI is constructed #64

Closed skalarproduktraum closed 5 years ago

skalarproduktraum commented 5 years ago

The call to XInitThreads is necessary to avoid issues with Xlib when running 3D graphics stuff via Vulkan inside ImageJ, as e.g. required by SciView. The call is done dynamically via dlopen/dlsym to avoid problems when running e.g. on headless machines or machines that do not have X11 installed.

I have added the call for the moment to main(), I'm happy to move it if there's better locations for it.

skalarproduktraum commented 5 years ago

Thanks for the quick merge, highly appreciated! :+1: