check for the XFixes, XRender, XComposite, and XDamage extensions when USE_COMPOSITIN...
authorDana Jansens <danakj@orodu.net>
Fri, 1 Feb 2008 05:10:22 +0000 (00:10 -0500)
committerDana Jansens <danakj@orodu.net>
Mon, 4 Feb 2008 14:33:29 +0000 (09:33 -0500)
obt/display.c
obt/display.h

index 97a2992..22f97db 100644 (file)
@@ -47,6 +47,12 @@ gboolean obt_display_extension_sync      = FALSE;
 gint     obt_display_extension_sync_basep;
 gboolean obt_display_extension_composite = FALSE;
 gint     obt_display_extension_composite_basep;
+gboolean obt_display_extension_damage    = FALSE;
+gint     obt_display_extension_damage_basep;
+gboolean obt_display_extension_render    = FALSE;
+gint     obt_display_extension_render_basep;
+gboolean obt_display_extension_fixes     = FALSE;
+gint     obt_display_extension_fixes_basep;
 
 static gint xerror_handler(Display *d, XErrorEvent *e);
 
@@ -107,11 +113,10 @@ gboolean obt_display_open(const char *display_name)
             XSyncQueryExtension(d, &obt_display_extension_sync_basep,
                                 &junk) && XSyncInitialize(d, &junk, &junk);
         if (!obt_display_extension_sync)
-            g_message("X Sync extension is not present on the server or is an "
-                      "incompatible version");
+            g_message("X Sync extension is not present on the server");
 #endif
 
-#ifdef USE_XCOMPOSITE
+#ifdef USE_COMPOSITING
         if (XCompositeQueryExtension(d, &obt_display_extension_composite_basep,
                                      &junk))
         {
@@ -125,6 +130,24 @@ gboolean obt_display_open(const char *display_name)
         if (!obt_display_extension_composite)
             g_message("X Composite extension is not present on the server or "
                       "is an incompatible version");
+
+        obt_display_extension_damage =
+            XDamageQueryExtension(d, &obt_display_extension_damage_basep,
+                                  &junk);
+        if (!obt_display_extension_damage)
+            g_message("X Damage extension is not present on the server");
+
+        obt_display_extension_render =
+            XRenderQueryExtension(d, &obt_display_extension_render_basep,
+                                  &junk);
+        if (!obt_display_extension_render)
+            g_message("X Render extension is not present on the server");
+
+        obt_display_extension_fixes =
+            XFixesQueryExtension(d, &obt_display_extension_fixes_basep,
+                                  &junk);
+        if (!obt_display_extension_fixes)
+            g_message("X Fixes extension is not present on the server");
 #endif
 
         obt_prop_startup();
index 5d99533..678f9a8 100644 (file)
 #ifdef    SYNC
 #include <X11/extensions/sync.h>
 #endif
-#ifdef    USE_XCOMPOSITE
+#ifdef    USE_COMPOSITING
 #include <X11/extensions/Xcomposite.h>
 #include <X11/extensions/Xdamage.h>
 #include <X11/extensions/Xrender.h>
+#include <X11/extensions/Xfixes.h>
 #endif
 
 G_BEGIN_DECLS
@@ -60,6 +61,12 @@ extern gboolean obt_display_extension_sync;
 extern gint     obt_display_extension_sync_basep;
 extern gboolean obt_display_extension_composite;
 extern gint     obt_display_extension_composite_basep;
+extern gboolean obt_display_extension_damage;
+extern gint     obt_display_extension_damage_basep;
+extern gboolean obt_display_extension_render;
+extern gint     obt_display_extension_render_basep;
+extern gboolean obt_display_extension_fixes;
+extern gint     obt_display_extension_fixes_basep;
 
 extern Display* obt_display;