Advertisement
Guest User

Untitled

a guest
Apr 18th, 2014
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. display = XOpenDisplay(getenv("DISPALY"));
  2. screen = DefaultScreen(display);
  3. depth = DefaultDepth(display,screen);
  4. printf("depth: %dn", depth);
  5. rootwindow = RootWindow(display,screen);
  6.  
  7. XVisualInfo vinfo;
  8. XMatchVisualInfo(display, DefaultScreen(display), 32, TrueColor, &vinfo);
  9.  
  10. XSetWindowAttributes attr;
  11. attr.colormap = XCreateColormap(display, DefaultRootWindow(display), vinfo.visual, AllocNone);
  12. attr.border_pixel = 0;
  13. attr.background_pixel = 0;
  14.  
  15. window = XCreateWindow(display, DefaultRootWindow(display), 0, 0, 1440, 900, 0, vinfo.depth, InputOutput,
  16. vinfo.visual, CWColormap | CWBorderPixel | CWBackPixel, &attr);
  17.  
  18. gc = XCreateGC (display, window, 0, NULL);
  19. XSetBackground(display, gc, 0L);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement