Commit b8093f50 authored by Cedric Roux's avatar Cedric Roux

T tracer: fix problem with some displays

This commit attempts to fix the error:
    no good visual found
parent 31e472d2
......@@ -150,7 +150,17 @@ x_image *x_create_image(x_connection *_x, unsigned char *data,
vs = XGetVisualInfo(x->d, VisualDepthMask | VisualClassMask |
VisualRedMaskMask | VisualGreenMaskMask | VisualBlueMaskMask |
VisualBitsPerRGBMask, &template, &nvs);
if (vs == NULL || nvs == 0) ERR("no good visual found\n");
if (vs == NULL) {
/* try again with 32 bpp */
template.depth = 32;
vs = XGetVisualInfo(x->d, VisualDepthMask | VisualClassMask |
VisualRedMaskMask | VisualGreenMaskMask | VisualBlueMaskMask |
VisualBitsPerRGBMask, &template, &nvs);
}
if (vs == NULL) ERR("no good visual found\n");
v = vs[0].visual;
XFree(vs);
......
Markdown is supported
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