diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | xdpyinfo.c | 24 |
3 files changed, 32 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index ee33b76..5f3bb9b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,6 +30,7 @@ AM_CFLAGS = \ $(DPY_XF86MISC_CFLAGS) \ $(DPY_XINPUT_CFLAGS) \ $(DPY_XRENDER_CFLAGS) \ + $(DPY_XCOMPOSITE_CFLAGS) \ $(DPY_XINERAMA_CFLAGS) \ $(DPY_DMX_CFLAGS) \ $(DPY_XPRINT_CFLAGS) \ @@ -44,6 +45,7 @@ xdpyinfo_LDADD = \ $(DPY_XF86MISC_LIBS) \ $(DPY_XINPUT_LIBS) \ $(DPY_XRENDER_LIBS) \ + $(DPY_XCOMPOSITE_LIBS) \ $(DPY_XINERAMA_LIBS) \ $(DPY_DMX_LIBS) \ $(DPY_XPRINT_LIBS) \ diff --git a/configure.ac b/configure.ac index c787a02..2b8bb5c 100644 --- a/configure.ac +++ b/configure.ac @@ -99,6 +99,12 @@ PKG_CHECK_MODULES(DPY_XRENDER, xrender, AC_CHECK_HEADERS([X11/extensions/Xrender.h],,,[#include <X11/Xlib.h>]) CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"]) +PKG_CHECK_MODULES(DPY_XCOMPOSITE, xcomposite, + [SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $DPY_XCOMPOSITE_CFLAGS $DPY_X11_CFLAGS" + AC_CHECK_HEADERS([X11/extensions/Xcomposite.h],,,[#include <X11/Xlib.h>]) + CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"]) + AC_ARG_WITH(xinerama, AC_HELP_STRING([--without-xinerama],[Disable xinerama support.]), [USE_XINERAMA="$withval"], [USE_XINERAMA="yes"]) if test "x$USE_XINERAMA" != "xno" ; then @@ -66,6 +66,10 @@ in this Software without prior written authorization from The Open Group. # define XRENDER # endif +# if HAVE_X11_EXTENSIONS_XCOMPOSITE_H +# define COMPOSITE +# endif + # if HAVE_X11_EXTENSIONS_XINERAMA_H # define PANORAMIX # endif @@ -116,6 +120,9 @@ in this Software without prior written authorization from The Open Group. #ifdef XRENDER #include <X11/extensions/Xrender.h> #endif +#ifdef COMPOSITE +#include <X11/extensions/Xcomposite.h> +#endif #ifdef PANORAMIX #include <X11/extensions/Xinerama.h> #endif @@ -1166,6 +1173,20 @@ print_xrender_info(Display *dpy, char *extname) } #endif /* XRENDER */ +#ifdef COMPOSITE +static int +print_composite_info(Display *dpy, char *extname) +{ + int majorrev, minorrev, foo; + + if (!XCompositeQueryExtension(dpy, &foo, &foo)) + return 0; + if (!XCompositeQueryVersion(dpy, &majorrev, &minorrev)) + return 0; + print_standard_extension_info(dpy, extname, majorrev, minorrev); + return 1; +} +#endif #ifdef PANORAMIX @@ -1443,6 +1464,9 @@ static ExtensionPrintInfo known_extensions[] = #ifdef XRENDER {RENDER_NAME, print_xrender_info, False}, #endif +#ifdef COMPOSITE + {COMPOSITE_NAME, print_composite_info, False}, +#endif #ifdef PANORAMIX {"XINERAMA", print_xinerama_info, False}, #endif |