How to create a window with a bit depth of 32
问题 I'm trying to create a X11 window with a bit depth of 32 so that I can use ARGB colors. Here's what I do: XVisualInfo vinfo; int depth = 32; XMatchVisualInfo(dpy, XDefaultScreen(dpy), depth, TrueColor, &vinfo); XCreateWindow(dpy, XDefaultRootWindow(dpy), 0, 0, 150, 100, 0, depth, InputOutput, vinfo.visual, 0, NULL); Here's what happens: X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 1 (X_CreateWindow) Serial number of failed request: 7