check for composite version 0.3
[dana/dcompmgr.git] / dcompmgr.c
index 175b522..542f1ad 100644 (file)
@@ -71,6 +71,33 @@ main(int argc, char **argv)
         return 1;
     }
 
+    if (!dpy->composite.present) {
+        printf(_("no composite extension present on the display\n"));
+        display_unref(dpy);
+        return 1;
+    }
+    if (!dpy->xfixes.present) {
+        printf(_("no xfixes extension present on the display\n"));
+        display_unref(dpy);
+        return 1;
+    }
+    if (!dpy->damage.present) {
+        printf(_("no damage extension present on the display\n"));
+        display_unref(dpy);
+        return 1;
+    }
+    if (!dpy->render.present) {
+        printf(_("no render extension present on the display\n"));
+        display_unref(dpy);
+        return 1;
+    }
+    if (dpy->composite.major_version <= 0 && dpy->composite.minor_version < 3)
+    {
+        printf(_("composite extension does not support the overlay window"));
+        display_unref(dpy);
+        return 1;
+    }
+
     nscreens = all_screens(dpy, &screens);
     if (nscreens < 1) {
         printf(_("found no screens to run on\n"));