3 #include <X11/extensions/shape.h>
9 static int x_error_handler(Display * disp, XErrorEvent * error)
12 XGetErrorText(disp, error->error_code, buf, 1024);
21 struct RrInstance *inst;
25 if (!(display = XOpenDisplay(NULL))) {
26 fprintf(stderr, "couldn't connect to X server in DISPLAY\n");
29 XSetErrorHandler(x_error_handler);
30 win = XCreateWindow(display, RootWindow(display, DefaultScreen(display)),
32 CopyFromParent, /* depth */
33 CopyFromParent, /* class */
34 CopyFromParent, /* visual */
37 XMapWindow(display, win);
38 XSelectInput(display, win, ExposureMask | StructureNotifyMask);
40 chint.res_name = "rendertest";
41 chint.res_class = "Rendertest";
42 XSetClassHint(display, win, &chint);
45 if (!(inst = RrInit(display, DefaultScreen(display)))) {
46 fprintf(stderr, "couldn't initialize the Render library "
47 "(no suitable GL support found)\n");
53 XNextEvent(display, &report);
54 switch (report.type) {
58 /*look->area.width = report.xconfigure.width;
59 look->area.height = report.xconfigure.height;