#6528 Also display error text as well as error code when logging an X11 error

This commit is contained in:
walker0643 2018-02-01 18:21:47 -05:00 committed by Nick Bolton
parent 4b809048ad
commit 70a26763a5
1 changed files with 4 additions and 2 deletions

View File

@ -1781,8 +1781,10 @@ XWindowsUtil::ErrorLock::ignoreHandler(Display*, XErrorEvent* e, void*)
}
void
XWindowsUtil::ErrorLock::saveHandler(Display*, XErrorEvent* e, void* flag)
XWindowsUtil::ErrorLock::saveHandler(Display* display, XErrorEvent* e, void* flag)
{
LOG((CLOG_DEBUG1 "flagging X error: %d", e->error_code));
char errtxt[1024];
XGetErrorText(display, e->error_code, errtxt, 1023);
LOG((CLOG_DEBUG1 "flagging X error: %d - %.1023s", e->error_code, errtxt));
*static_cast<bool*>(flag) = true;
}