Pseudo-transparency

Last updated

Pseudo-transparency is a term used for X Window System clients that simulate the appearance of translucency or transparency by manipulating the same pixmap 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. [1]

Contents

Purpose

Traditionally, the X Window System 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, 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 windows. This method simply uses the XCopyArea() function to take a partial screenshot for use as the window's background pixmap.

Future

Recent technologies such as DirectFB, Direct Rendering Infrastructure, and hardware compositing via OpenGL allow X client applications to utilize true alpha transparency.

Related Research Articles

X window manager Type of window manager

An X window manager is a window manager that runs on top of the X Window System, a windowing system mainly used on Unix-like systems.

Windowing system Software that manages separately different parts of display screens

In computing, a windowing system is software that manages separately different parts of display screens. It is a type of graphical user interface (GUI) which implements the WIMP paradigm for a user interface.

Aqua (user interface) User interface of macOS by Apple

Aqua is the graphical user interface, design language and visual theme of Apple's macOS operating system. It was originally based on the theme of water, with droplet-like components and a liberal use of reflection effects and translucency. Its goal is to "incorporate color, depth, translucence, and complex textures into a visually appealing interface" in macOS applications. At its introduction, Steve Jobs noted that "... it's liquid, one of the design goals was when you saw it you wanted to lick it".

GLX is an extension to the X Window System core protocol providing an interface between OpenGL and the X Window System as well as extensions to OpenGL itself. It enables programs wishing to use OpenGL to do so within a window provided by the X Window System. GLX distinguishes two "states": indirect state and direct state.

RFB is an open simple protocol for remote access to graphical user interfaces. Because it works at the framebuffer level it is applicable to all windowing systems and applications, including Microsoft Windows, macOS and the X Window System. RFB is the protocol used in Virtual Network Computing (VNC) and its derivatives.

Window manager Type of system software

A window manager is system software that controls the placement and appearance of windows within a windowing system in a graphical user interface. Most window managers are designed to help provide a desktop environment. They work in conjunction with the underlying graphical system that provides required functionality—support for graphics hardware, pointing devices, and a keyboard, and are often written and created using a widget toolkit.

Linux Terminal Server Project (LTSP) is a free and open source terminal server for Linux that allows many people to simultaneously use the same computer. Applications run on the server with a terminal known as a thin client handling input and output. Generally, terminals are low-powered, lack a hard disk and are quieter and more reliable than desktop computers because they do not have any moving parts.

Direct Rendering Infrastructure Framework

The Direct Rendering Infrastructure (DRI) is a framework for allowing direct access to graphics hardware under the X Window System in a safe, efficient way. The main use of DRI is to provide hardware acceleration for the Mesa implementation of OpenGL. DRI has also been adapted to provide OpenGL acceleration on a framebuffer console without a display server running.

Diskless node

A diskless node is a workstation or personal computer without disk drives, which employs network booting to load its operating system from a server.

In computing, the X Window System is a network-transparent windowing system for bitmap displays. This article details the protocols and technical structure of X11.

Remote administration refers to any method of controlling a computer from a remote location. Software that allows remote administration is becoming increasingly common and is often used when it is difficult or impractical to be physically near a system in order to use it. A remote location may refer to a computer in the next room or one on the other side of the world. It may also refer to both legal and illegal remote administration.

Windows Presentation Foundation (WPF) is a free and open-source graphical subsystem originally developed by Microsoft for rendering user interfaces in Windows-based applications. WPF, previously known as "Avalon", was initially released as part of .NET Framework 3.0 in 2006. WPF uses DirectX and attempts to provide a consistent programming model for building applications. It separates the user interface from business logic, and resembles similar XML-oriented object models, such as those implemented in XUL and SVG.

Root window

In the X Window System, every window is contained within another window, called its parent. This makes the windows form a hierarchy. The root window is the root of this hierarchy. It is as large as the screen/display surface, and all other windows are either children or descendants of it.

X Rendering Extension

The X Rendering Extension is an extension to the X11 core protocol to implement image compositing in the X server, to allow an efficient display of transparent images.

Desktop Window Manager is the compositing window manager in Microsoft Windows since Windows Vista that enables the use of hardware acceleration to render the graphical user interface of Windows.

Selections, cut buffers, and drag-and-drop are the mechanisms used in the X Window System to allow a user to transfer data from one window to another. Selections and cut buffer are typically used when a user selects text or some other data in a window and pastes in another one. Drag-and-drop is used when a user selects something in a window, then clicks on the selection and drags it into another window.

The X Window System core protocol is the base protocol of the X Window System, which is a networked windowing system for bitmap displays used to build graphical user interfaces on Unix, Unix-like, and other operating systems. The X Window System is based on a client–server model: a single server controls the input/output hardware, such as the screen, the keyboard, and the mouse; all application programs act as clients, interacting with the user and with the other clients via the server. This interaction is regulated by the X Window System core protocol. Other protocols related to the X Window System exist, both built at the top of the X Window System core protocol or as separate protocols.

AIGLX Open source project

Accelerated Indirect GLX ("AIGLX") is an open source project founded by Red Hat and the Fedora community, led by Kristian Høgsberg, to allow accelerated indirect GLX rendering capabilities to the X.Org Server and DRI drivers. This allows remote X clients to get fully hardware accelerated rendering over the GLX protocol; coincidentally, this development was required for OpenGL compositing window managers to function with hardware acceleration.

Remote Desktop Services (RDS), known as Terminal Services in Windows Server 2008 and earlier, is one of the components of Microsoft Windows that allow a user to take control of a remote computer or virtual machine over a network connection. RDS is Microsoft's implementation of thin client architecture, where Windows software, and the entire desktop of the computer running RDS, are made accessible to any remote client machine that supports Remote Desktop Protocol (RDP). User interfaces are displayed from the server onto the client system and input from the client system is transmitted to the server - where software execution takes place. This is in contrast to application streaming systems, like Microsoft App-V, in which computer programs are streamed to the client on-demand and executed on the client machine.

Wayland (display server protocol) Computer display server protocol

Wayland is a communication protocol that specifies the communication between a display server and its clients, as well as a C library implementation of that protocol. A display server using the Wayland protocol is called a Wayland compositor, because it additionally performs the task of a compositing window manager.

References

  1. "Tutorial: Urxvt: transparency". CTKArch. 2014. Retrieved February 23, 2016.