SYNOPSIS
#include <X11/extensions/Xcomposite.h>
Bool XCompositeQueryExtension(Display *dpy, int *event_base_return, int *error_base_return);
Status XCompositeQueryVersion(Display *dpy, int *major_version_return, int *minor_version_return);
int XCompositeVersion(void);
void XCompositeRedirectWindow(Display *dpy, Window window, int update);
void XCompositeRedirectSubwindows(Display *dpy, Window window, int update);
void XCompositeUnredirectWindow(Display *dpy, Window window, int update);
void XCompositeUnredirectSubwindows(Display *dpy, Window window, int update);
XserverRegion XCompositeCreateRegionFromBorderClip(Display *dpy, Window window);
Pixmap XCompositeNameWindowPixmap(Display *dpy, Window window);
Window XCompositeGetOverlayWindow(Display *dpy, Window window);
void XCompositeReleaseOverlayWindow(Display *dpy, Window window);
DESCRIPTION
The composite extension provides several related mechanisms:
-
Per-hierarchy storage
-
The rendering of an entire hierarchy of windows is redirected to off-screen storage. The pixels of that hierarchy are available whenever it is viewable. Storage is automatically reallocated when the top level window changes size. Contents beyond the geometry of the top window are not preserved.
-
Automatic shadow update
-
When a hierarchy is rendered off-screen, the X server provides an automatic mechanism for presenting those contents within the parent window. The implementation is free to make this update lag behind actual rendering operations by an unspecified amount of time. This automatic update mechanism may be disabled so that the parent window contents can be completely determined by an external application.
-
Composite Overlay Window
-
Version 0.3 of the protocol adds the Composite Overlay Window, which provides compositing managers with a surface on which to draw without interference. This window is always above normal windows and is always below the screen saver window. It is an InputOutput window whose width and height are the screen dimensions. Its visual is the root visual and its border width is zero. Attempts to redirect it using the composite extension are ignored. This window does not appear in the reply of the QueryTree request. It is also an override redirect window. These last two features make it invisible to window managers and other X11 clients. The only way to access the XID of this window is via the CompositeGetOverlayWindow request. Initially, the Composite Overlay Window is unmapped.
-
Parent window clipping
-
Version 0.4 of the protocol modifies the semantics of parent window clipping in the presence of manual redirected children. With this version, the area in the parent covered by manual redirected children is left in the parent clip list instead of being removed as in older versions.
Per-hierarchy storage may be created for individual windows or for all children of a window. Manual shadow update may be selected by only a single application for each window; manual update may also be selected on a per-window basis or for each child of a window. Detecting when to update may be done with the Damage extension.
The off-screen storage includes the window contents, its borders and the contents of all descendants.