void __glXSendError(Display * dpy, int_fast8_t errorCode, uint_fast32_t resourceID, uint_fast16_t minorCode, bool coreX11error) { struct glx_display *glx_dpy = __glXInitialize(dpy); struct glx_context *gc = __glXGetCurrentContext(); xError error; assert(glx_dpy); assert(gc); LockDisplay(dpy); error.type = X_Error; if (coreX11error) { error.errorCode = errorCode; } else { error.errorCode = glx_dpy->codes->first_error + errorCode; } error.sequenceNumber = dpy->request; error.resourceID = resourceID; error.minorCode = minorCode; error.majorCode = gc ? gc->majorOpcode : 0; _XError(dpy, &error); UnlockDisplay(dpy); }
void __glXSendError(Display * dpy, int errorCode, unsigned long resourceID, unsigned long minorCode, bool coreX11error) { XExtDisplayInfo *info = __glXFindDisplay(dpy); GLXContext gc = __glXGetCurrentContext(); xError error; LockDisplay(dpy); error.type = X_Error; if (coreX11error) { error.errorCode = errorCode; } else { error.errorCode = info->codes->first_error + errorCode; } error.sequenceNumber = dpy->request; error.resourceID = resourceID; error.minorCode = minorCode; error.majorCode = gc ? gc->majorOpcode : 0; _XError(dpy, &error); UnlockDisplay(dpy); }
static void __glXGenerateError(Display * dpy, XID resource, BYTE errorCode, CARD16 minorCode) { xError error; error.errorCode = errorCode; error.resourceID = resource; error.sequenceNumber = dpy->request; error.type = X_Error; error.majorCode = __glXSetupForCommand(dpy); error.minorCode = minorCode; _XError(dpy, &error); }
static void __glXGenerateError(Display * dpy, GLXContext gc, XID resource, BYTE errorCode, CARD16 minorCode) { xError error; error.errorCode = errorCode; error.resourceID = resource; error.sequenceNumber = dpy->request; error.type = X_Error; error.majorCode = gc->majorOpcode; error.minorCode = minorCode; _XError(dpy, &error); }
void __glXSendErrorForXcb(Display * dpy, const xcb_generic_error_t *err) { xError error; LockDisplay(dpy); error.type = X_Error; error.errorCode = err->error_code; error.sequenceNumber = err->sequence; error.resourceID = err->resource_id; error.minorCode = err->minor_code; error.majorCode = err->major_code; _XError(dpy, &error); UnlockDisplay(dpy); }