From: Dana Jansens Date: Tue, 19 Jun 2007 21:52:44 +0000 (+0000) Subject: check for damage and render extensions if going to use composite. require them for... X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=ad4def8e521c449628f6e69b13a7eca63b152793;p=chaz%2Fopenbox check for damage and render extensions if going to use composite. require them for it. also include the cflags/libs. and only run the xcomposite stuff so far when the server supports it --- diff --git a/Makefile.am b/Makefile.am index 6fa3a8e6..73a05eee 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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) \ diff --git a/configure.ac b/configure.ac index e62f1be3..795b7742 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/openbox/extensions.h b/openbox/extensions.h index 6a488a19..e1070e86 100644 --- a/openbox/extensions.h +++ b/openbox/extensions.h @@ -39,6 +39,11 @@ #ifdef SYNC #include #endif +#ifdef USE_XCOMPOSITE +#include +#include +#include +#endif #include diff --git a/openbox/screen.c b/openbox/screen.c index d5a51941..1ef08075 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -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 */