This looks like an X11 bug to me... this code creates a visual of depth 32, uses it to create a window, and blows up under the XMapRaised with BadMatch in X_CreateWindow. xdpyinfo shows that the selected visual is correctly a 32 bit TrueColor visual. If I request a 24 bit visual, its OK.

int
main(int argc, char *argv[])
{
    Display *dpy = XOpenDisplay(":0.0");

    XVisualInfo *vinf, tmp;
    long mask; int n;
    mask = VisualDepthMask | VisualClassMask;
    tmp.depth = 32;
    tmp.c_class = 4;
    vinf = XGetVisualInfo(dpy, mask, &tmp, &n);

Window win = XCreateWindow(dpy, DefaultRootWindow(dpy), 0, 0, 256, 256, 0,
            vinf->depth, InputOutput, vinf->visual, 0, NULL);

    if (! win)
    {
        std::cerr << "unable to create window\n";
        exit(1);
    }

    XMapRaised(dpy, win);
}


--
Gregory D. Abram, Ph.D.
Texas Advanced Computing Center
JJ Pickle Research Campus - ROC 1.101 Bldg 196
10100 Burnet Road
Austin, TX 78758-4497


g...@tacc.utexas.edu
(512) 471-8196

_______________________________________________
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com

Reply via email to