mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-02-03 22:50:28 +01:00
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 <ajax@redhat.com>
This commit is contained in:
parent
257927c51b
commit
da97120f23
1 changed files with 6 additions and 2 deletions
|
|
@ -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); \
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue