<div>Hi:</div><div>    I want to create a window that has transparent background.How to do?I use XSetBackground(display, gc, 0), the background is black.I change the depth of the screen to 32.The resault is still black.Here is my code:</div><div>        </div><div>        display = XOpenDisplay(getenv("DISPALY"));</div><div>        screen = DefaultScreen(display);</div><div>        depth = DefaultDepth(display,screen);</div><div>        printf("depth: %d\n", depth);</div><div>        rootwindow = RootWindow(display,screen);</div><div><br></div><div>        XVisualInfo vinfo;</div><div>        XMatchVisualInfo(display, DefaultScreen(display), 32, TrueColor, &vinfo);</div><div><br></div><div><span style="line-height: 1.5;">        XSetWindowAttributes attr;</span></div><div>        attr.colormap = XCreateColormap(display, DefaultRootWindow(display), vinfo.visual, AllocNone);</div><div>        attr.border_pixel = 0;</div><div>        attr.background_pixel = 0;<span style="line-height: 1.5;"> </span></div><div><span style="line-height: 1.5;"><br></span></div><div><span style="line-height: 1.5;">        window = XCreateWindow(display, DefaultRootWindow(display), 0, 0, 1440, 900, 0, vinfo.depth, InputOutput,</span></div><div>                        vinfo.visual, CWColormap | CWBorderPixel | CWBackPixel, &attr);</div><div>     </div><div>        gc = XCreateGC (display, window, 0, NULL);</div><div>       <span style="line-height: 1.5;">XSetBackground(display, </span><span style="line-height: 1.5;">gc,</span><span style="line-height: 1.5;"> 0L);</span></div><div><br></div><div><br></div><div><br></div><div>        </div><div>        </div><div><br></div><div><br></div><div><br></div><div>        </div>