diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-02-04 13:43:34 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-02-04 13:45:39 -0800 |
commit | bb7e3c9ac00d5b3933b69470e03fadfe1800f7ae (patch) | |
tree | 9a30ec99142253f91a5f0d2c6d515486019ed124 /xdpyinfo.c | |
parent | 3a041bbccdee28b628ce5243e77d7d3125a186d4 (diff) |
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 <alan.coopersmith@sun.com>
Diffstat (limited to 'xdpyinfo.c')
-rw-r--r-- | xdpyinfo.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -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 |