HOME

TheInfoList



OR:

''Pseudo-transparency'' is a term used for
X Window System The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting ...
clients that simulate the appearance of translucency or
transparency Transparency, transparence or transparent most often refer to: * Transparency (optics), the physical property of allowing the transmission of light through a material They may also refer to: Literal uses * Transparency (photography), a still ...
by manipulating the same
pixmap In computing, a bitmap is a mapping from some domain (for example, a range of integers) to bits. It is also called a bit array or bitmap index. As a noun, the term "bitmap" is very often used to refer to a particular bitmapping application: the ...
that has been drawn on the root
window A window is an opening in a wall, door, roof, or vehicle that allows the exchange of light and may also allow the passage of sound and sometimes air. Modern windows are usually glazed or covered in some other transparent or translucent mate ...
, or by instructing the X Server that the Background Pixmap should be inherited from the window's parent.


Purpose

Traditionally, the
X Window System The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting ...
has lagged behind other windowing systems in adding purely eye candy or aesthetic features, such as window translucency. This has encouraged developers to develop kludges to overcome this limitation. This pseudo-transparency, so called as the background pixmap of the root window is visible (analogous to desktop wallpaper) rather than any obscured windows, allows users to make windows look less imposing (such as Terminal emulators, which usually comprise large chunks of text), and to integrate the appearance of windows with their desktop themes.


Implementation

There are three common methods for achieving pseudo-transparency using Xlib, each with its own advantages and drawbacks.


Parental-relative

The "parental-relative" method uses XSetWindowBackgroundPixmap() to inherit the parent window's background image. Unfortunately, using this method, the X server permits very few operations to be performed on the background pixmap (such as XOR), preventing clients from implementing any sort of advanced image filtering.


_XROOTPMAP_ID and ESETROOT_PMAP_ID properties

These properties are used to inform the window where it can find the pixmap used on the root window. Using this information, a client can paint a section of the image (corresponding to the size and position of the window) onto its background, achieving the effect of transparency. This method uses the most
memory Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembered ...
, but has the advantage of allowing clients to perform any operation, such as tinting or
shading Shading refers to the depiction of depth perception in 3D models (within the field of 3D computer graphics) or illustrations (in visual art) by varying the level of darkness. Shading tries to approximate local behavior of light on the object ...
, on the image data.


XCopyArea

''XCopyArea'' can achieve a more realistic transparency effect in that it can include obscured windows, but with the significant disadvantage that it is only usable with modal windows. This method simply uses the XCopyArea() function to take a partial
screenshot screenshot (also known as screen capture or screen grab) is a digital image that shows the contents of a computer display. A screenshot is created by the operating system or software running on the device powering the display. Additionally, s ...
for use as the window's background pixmap.


Future

Recent technologies such as DirectFB, Direct Rendering Infrastructure, and hardware compositing via
OpenGL OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve ha ...
allow X client applications to utilize true alpha transparency.


References

X Window System {{Compu-graphics-stub