You can create a transparent overlay using XSolarisOvlCreateWindow. This routine behaves exactly as XCreateWindow except that the resulting window is a transparent overlay window. The newly created window can be rendered into with both opaque and transparent paint, and the background of the overlay window is transparent.
The class argument to XSolarisOvlCreateWindow should be InputOutput. An overlay window can be created as an InputOnly window but, in this case, it will behave like a standard InputOnly window. It is only for InputOutput windows that there is a difference between overlay and non-overlay.
The syntax and arguments for XSolarisOvlCreateWindow are shown below.
Window XSolarisOvlCreateWindow(Display *display, Window parent, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, int depth, unsigned int class, Visual * visual, unsigned long valuemask, XSetWindowAttributes * attr)
The arguments for this routine are the same as those for XCreateWindow.
You can use any visual to create the overlay. However, not all overlay/underlay visual pairs may be optimal. Each screen defines a set of optimal overlay/underlay visual pairs. These define the optimal visuals of the overlay windows that can be created with a particular underlay visual. Likewise, they define the optimal visuals of underlay windows that can be created with a particular overlay visual. You can determine the optimal pairs using XSolarisOvlSelectPair and XSolarisOvlSelectPartner.
The definition of optimal varies from device to device, but it will usually refer to the ability of a device to create an overlay window in a different plane group than that of an underlay window. See Selecting an Optimal Overlay/Underlay Visual Pair for more information on overlay/underlay visual pairs.