- Pseudo-transparency
"Pseudo-transparency" is a term used for
X Window System clients that simulate the appearance oftranslucency or transparency by manipulating the samepixmap that has been drawn on the root window, or by instructing the X Server that the Background Pixmap should be inherited from the window's parent.Purpose
Traditionally, the
X Window System has lagged behind other windowing systems in adding purelyeye candy or aesthetic features, such as windowtranslucency . This has encouraged client developers to develop hacks (cunning workarounds) 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 emulator s, 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 asXOR ), 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, but has the advantage of allowing clients to perform any operation, such as tinting or
shading , 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 window s. This method simply uses theXCopyArea()
function to take a partialscreenshot for use as the window's background pixmap.Future
Recent technologies such as
DirectFB ,Direct Rendering Infrastructure , and hardwarecompositing viaOpenGL allow X client applications to utilize truealpha transparency .
Wikimedia Foundation. 2010.