add(core/linux/X11): comment to explain why XInitThreads is called first

This commit is contained in:
Ronald M Zielaznicki 2024-10-21 13:25:31 -04:00 committed by Stephen Gutekanst
parent 355dd53857
commit ef74e6a953

View file

@ -86,6 +86,10 @@ pub fn init(
) !X11 { ) !X11 {
// TODO(core): return errors.NotSupported if not supported // TODO(core): return errors.NotSupported if not supported
const libx11 = try LibX11.load(); const libx11 = try LibX11.load();
// Xlibx11.XInitThreads must be called first
//
// if not, 'Unknown sequence number while processing queue' errors occur.
_ = libx11.XInitThreads(); _ = libx11.XInitThreads();
const libgl: ?LibGL = LibGL.load() catch |err| switch (err) { const libgl: ?LibGL = LibGL.load() catch |err| switch (err) {
error.LibraryNotFound => null, error.LibraryNotFound => null,