#include <X11/Xlib.h>
#include <X11/extensions/Xcomposite.h>
#include <X11/extensions/Xdamage.h>
+#include <X11/extensions/shape.h>
#include <GL/gl.h>
#include <GL/glx.h>
XSelectInput(compositor->display, screen->root, SubstructureNotifyMask);
screen->overlay = XCompositeGetOverlayWindow(compositor->display, screen->root);
XGetGeometry(compositor->display, screen->overlay, &dummy_root, &x, &y, &screen->width, &screen->height, &border, &depth);
+ XShapeCombineRectangles(compositor->display, screen->overlay, ShapeInput, 0, 0, NULL, 0, ShapeSet, Unsorted);
if(!initialize_gl(compositor, screen))
return 0;
else if(major_ver<1)
return with_error("XDamage 1.0 or later is required");
+ if(!XShapeQueryExtension(compositor->display, &event_base, &error_base))
+ return with_error("XShape is required but was not found");
+ else if(!XShapeQueryVersion(compositor->display, &major_ver, &minor_ver))
+ return with_error("Cannot determine XShape version");
+ else if(major_ver<1 || (major_ver==1 && minor_ver<1))
+ return with_error("XShape 1.1 or later is required");
+
compositor->glXCreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC)glXGetProcAddress((unsigned char *)"glXCreateContextAttribsARB");
compositor->glXBindTexImageEXT = (PFNGLXBINDTEXIMAGEEXTPROC)glXGetProcAddress((unsigned char *)"glXBindTexImageEXT");
compositor->glXReleaseTexImageEXT = (PFNGLXRELEASETEXIMAGEEXTPROC)glXGetProcAddress((unsigned char *)"glXReleaseTexImageEXT");