From bb7e3c9ac00d5b3933b69470e03fadfe1800f7ae Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 4 Feb 2009 13:43:34 -0800 Subject: Print Composite extension version for "-ext Composite" The only other information I could see to query in the Composite 0.4 protocol spec is the Composite Overlay Window XID, but the request to get that ID has the side effect of mapping the overlay window, and xdpyinfo shouldn't have side effects like that. Signed-off-by: Alan Coopersmith --- xdpyinfo.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'xdpyinfo.c') diff --git a/xdpyinfo.c b/xdpyinfo.c index 014e2bb..ede6465 100644 --- a/xdpyinfo.c +++ b/xdpyinfo.c @@ -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 #endif +#ifdef COMPOSITE +#include +#endif #ifdef PANORAMIX #include #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 -- cgit v1.2.3