| 27 | |
| 28 | |
| 29 | static Window create_window(Display *dpy, XVisualInfo *vis, int width, |
| 30 | int height) |
| 31 | { |
| 32 | Window win; |
| 33 | XSetWindowAttributes wattrs; |
| 34 | Colormap cmap; |
| 35 | |
| 36 | cmap = XCreateColormap(dpy, RootWindow(dpy, vis->screen), vis->visual, |
| 37 | AllocNone); |
| 38 | wattrs.background_pixel = 0; |
| 39 | wattrs.border_pixel = 0; |
| 40 | wattrs.colormap = cmap; |
| 41 | wattrs.event_mask = 0; |
| 42 | win = _XCreateWindow(dpy, RootWindow(dpy, vis->screen), 0, 0, width, height, |
| 43 | 1, vis->depth, InputOutput, vis->visual, |
| 44 | CWBackPixel | CWBorderPixel | CWEventMask | CWColormap, &wattrs); |
| 45 | return win; |
| 46 | } |
| 47 | |
| 48 | |
| 49 | // Pbuffer constructor |