Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- display = XOpenDisplay(getenv("DISPALY"));
- screen = DefaultScreen(display);
- depth = DefaultDepth(display,screen);
- printf("depth: %dn", depth);
- rootwindow = RootWindow(display,screen);
- XVisualInfo vinfo;
- XMatchVisualInfo(display, DefaultScreen(display), 32, TrueColor, &vinfo);
- XSetWindowAttributes attr;
- attr.colormap = XCreateColormap(display, DefaultRootWindow(display), vinfo.visual, AllocNone);
- attr.border_pixel = 0;
- attr.background_pixel = 0;
- window = XCreateWindow(display, DefaultRootWindow(display), 0, 0, 1440, 900, 0, vinfo.depth, InputOutput,
- vinfo.visual, CWColormap | CWBorderPixel | CWBackPixel, &attr);
- gc = XCreateGC (display, window, 0, NULL);
- XSetBackground(display, gc, 0L);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement