Commit da97120f authored by Adam Jackson's avatar Adam Jackson 🎧
Browse files

xcb: Clarify the XInitThreads error message



XInitThreads has been called if _Xglobal_lock != NULL, we may as well
check that before printing a misleading error message.

Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
parent 257927c5
Pipeline #539543 passed with stages
in 13 minutes and 6 seconds
......@@ -32,8 +32,12 @@
#define throw_thread_fail_assert(_message, _var) { \
fprintf(stderr, "[xcb] " _message "\n"); \
fprintf(stderr, "[xcb] Most likely this is a multi-threaded client " \
"and XInitThreads has not been called\n"); \
if (_Xglobal_lock) { \
fprintf(stderr, "[xcb] You called XInitThreads, this is not your fault\n"); \
} else { \
fprintf(stderr, "[xcb] Most likely this is a multi-threaded client " \
"and XInitThreads has not been called\n"); \
} \
xcb_fail_assert(_message, _var); \
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment