JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Solaris X Window System Developer's Guide
search filter icon
search icon

Document Information


1.  Introduction to the Solaris X Server

2.  DPS Features and Enhancements

3.  Visuals on the Solaris X Server

4.  Font Support

5.  Server Overlay Windows

6.  Transparent Overlay Windows

What are Transparent Overlay Windows?

Basic Characteristics of Transparent Overlay Windows

Paint Type


More on Transparent Overlay Characteristics


Window Border

Backing Store

Window Gravity


Input Distribution Model

Print Capture

Choosing Visuals for Overlay/Underlay Windows

Example Program

Overview of the Solaris Transparent Overlay Window API

Creating Transparent Overlay Windows

Setting the Paint Type of a Graphics Context

Setting the Background State of a Transparent Overlay Window

Rendering to a Transparent Overlay Window

Querying the Characteristics of a Transparent Overlay Window

Determining Whether a Window is an Overlay Window

Determining the Paint Type of a Graphics Context

Pixel Transfer Routines

Filling an Area Using the Source Area Paint Type

Copying an Area and Its Paint Type

Retrieving Overlay Color Information

Using Existing Xlib Pixel Transfer Routines


XCopyArea and XCopyPlane

Designing an Application for Portability

Selecting a Visual for an Overlay/Underlay Window

Argument Types

Return Types

Multiple Criteria Sets

Selecting an Optimal Overlay/Underlay Visual Pair

Argument Types

Return Types

Criteria Sets

7.  Security Issues

A.  Reference Display Devices



Creating Transparent Overlay Windows

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.


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.

Specifies the connection to the X server.
Specifies the parent window.
x, y
Specifies the coordinates of the upper-left pixel of this window, relative to the parent window.
width, height
Specifies the width and height, in pixels, of the window.
Specifies the width, in pixels, of the window's borders.
Specifies the depth of the window.
Specifies the class of the window. If the class is not InputOutput, the window will not be an overlay window.
Specifies a pointer to the visual structure for this window.
Specifies which window attributes are defined in the attr argument.
Specifies the attributes of the window.

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.

Overlay windows are destroyed with the Xlib routines XDestroyWindow or XDestroySubwindows.