]> Dogcows Code - chaz/openbox/commitdiff
check for damage and render extensions if going to use composite. require them for...
authorDana Jansens <danakj@orodu.net>
Tue, 19 Jun 2007 21:52:44 +0000 (21:52 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 19 Jun 2007 21:52:44 +0000 (21:52 +0000)
Makefile.am
configure.ac
openbox/extensions.h
openbox/screen.c

index 6fa3a8e6ac4ea7a22c40fd83f51a0fbfcc758b3c..73a05eee62cc983d418865da99125f79c8bd39a2 100644 (file)
@@ -118,6 +118,9 @@ openbox_openbox_CPPFLAGS = \
        $(XRANDR_CFLAGS) \
        $(XSHAPE_CFLAGS) \
        $(XSYNC_CFLAGS) \
+       $(XRENDER_CFLAGS) \
+       $(XDAMAGE_CFLAGS) \
+       $(XCOMPOSITE_CFLAGS) \
        $(X_CFLAGS) \
        $(XCURSOR_CFLAGS) \
        $(SM_CFLAGS) \
@@ -137,6 +140,9 @@ openbox_openbox_LDADD = \
        $(XSHAPE_LIBS) \
        $(XSYNC_LIBS) \
        $(GLIB_LIBS) \
+       $(XRENDER_LIBS) \
+       $(XDAMAGE_LIBS) \
+       $(XCOMPOSITE_LIBS) \
        $(X_LIBS) \
        $(XCURSOR_LIBS) \
        $(LIBSN_LIBS) \
index e62f1be389b66ebd815d091794cbf7c7d3a3ed0e..795b774299dc220d16bdf250789e33566278ace5 100644 (file)
@@ -146,12 +146,32 @@ AC_ARG_ENABLE(xcomposite,
 )
 
 if test "$enable_xcomposite" = yes; then
-PKG_CHECK_MODULES(XCOMPOSITE, [xcomposite],
+PKG_CHECK_MODULES(XRENDER, [xrender],
   [
-    AC_DEFINE(USE_XCOMPOSITE, [1], [Use X Composite library])
-    AC_SUBST(XCOMPOSITE_CFLAGS)
-    AC_SUBST(XCOMPOSITE_LIBS)
-    xcomposite_found=yes
+    AC_DEFINE(USE_XRENDER, [1], [Use X Render library])
+    AC_SUBST(XRENDER_CFLAGS)
+    AC_SUBST(XRENDER_LIBS)
+    PKG_CHECK_MODULES(XDAMAGE, [xdamage],
+      [
+        AC_DEFINE(USE_XDAMAGE, [1], [Use X Damage library])
+        AC_SUBST(XDAMAGE_CFLAGS)
+        AC_SUBST(XDAMAGE_LIBS)
+        PKG_CHECK_MODULES(XCOMPOSITE, [xcomposite],
+          [ 
+            AC_DEFINE(USE_XCOMPOSITE, [1], [Use X Composite library])  
+            AC_SUBST(XCOMPOSITE_CFLAGS)           
+            AC_SUBST(XCOMPOSITE_LIBS)
+            xcomposite_found=yes
+          ],
+          [
+            xcomposite_found=no
+          ]
+        )
+      ],
+      [
+        xcomposite_found=no
+      ]
+    )
   ],
   [
     xcomposite_found=no
index 6a488a19365dedd5178963817d62dfd37c42ee57..e1070e86e55aa2d464e447d08e653d96cedf8bc9 100644 (file)
 #ifdef    SYNC
 #include <X11/extensions/sync.h>
 #endif
+#ifdef    USE_XCOMPOSITE
+#include <X11/extensions/Xcomposite.h>
+#include <X11/extensions/Xdamage.h>
+#include <X11/extensions/Xrender.h>
+#endif
 
 #include <glib.h>
 
index d5a5194183688c81c3cea835a6bee44d0a7c8024..1ef080752dbfdb50a885b10e27f83d7b3a39a23a 100644 (file)
@@ -365,10 +365,12 @@ void screen_startup(gboolean reconfig)
     }
 
 #ifdef USE_XCOMPOSITE
-    /* Redirect window contents to offscreen pixmaps */
-    XCompositeRedirectSubwindows(ob_display,
-                                 RootWindow(ob_display, ob_screen),
-                                 CompositeRedirectAutomatic);
+    if (extensions_comp) {
+        /* Redirect window contents to offscreen pixmaps */
+        XCompositeRedirectSubwindows(ob_display,
+                                     RootWindow(ob_display, ob_screen),
+                                     CompositeRedirectAutomatic);
+    }
 #endif
 
     /* get the initial size */
This page took 0.032328 seconds and 4 git commands to generate.