Re-parenting window manager
Encyclopedia
A stacking window manager (also called floating window manager) is a window manager
Window manager
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...

 that draws all windows in a specific order, allowing them to overlap, using a technique called painter's algorithm
Painter's algorithm
The painter's algorithm, also known as a priority fill, is one of the simplest solutions to the visibility problem in 3D computer graphics...

. All window manager
Window manager
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...

s which allow the overlapping of windows, but are not compositing window manager
Compositing window manager
A compositing window manager is a type of window manager. A window manager is software that draws a graphical user interface on a computer display – it positions windows, draws additional elements on windows , and controls how windows interact with each other, and with the rest of the desktop...

s are considered stacking window managers, although it is possible that not all use exactly the same methodologies. Other window managers that are not considered stacking window managers are those that do not allow the overlapping of windows. These are called tiling window manager
Tiling window manager
In computing, a tiling window manager is a window manager with an organization of the screen into mutually non-overlapping frames, as opposed to the more popular approach of coordinate-based stacking of overlapping objects that tries to fully emulate the desktop metaphor.-Xerox PARC:Although the...

s.

Stacking window managers allow windows to overlap by drawing them one at a time. Stacking, or repainting (in reference to painter's algorithm
Painter's algorithm
The painter's algorithm, also known as a priority fill, is one of the simplest solutions to the visibility problem in 3D computer graphics...

) refers to the rendering of each window as an image, painted directly over the desktop, and over any other windows that might already have been drawn, effectively erasing the areas that are covered. The process usually starts with the desktop, and proceeds by drawing each window and any child windows from back to front, until finally the foreground window is drawn.

The order in which windows are to be stacked is called their z-order
Z-order
Z-order is an ordering of overlapping two-dimensional objects, such as windows in a graphical user interface , shapes in a vector graphics editor, or objects in a 3D application. One of the features of a typical GUI is that windows may overlap, so that one window hides part or all of another...

.

Limitations

Stacking is a very slow process, requiring the redrawing of every window one-by-one, from the rear-most and outer-most to the front most and inner-most. Many stacking window managers don't always redraw background windows. Others can detect when a redraw of all windows is required, as some applications request stacking when their output has changed. Re-stacking is usually done through a function call to the window manager, which selectively redraws windows as needed. For example if a background window is brought to the front, only that window should need to be redrawn.

A well-known disadvantage of stacking is that when windows are painted over each other, they actually end up erasing the previous contents of whatever part of the screen they are covering. Those windows must be redrawn when they are brought to the foreground, or when visible parts of them change. When a window has changed or when its position on the screen has changed, the window manager will detect this and may re-stack all windows, requiring that each window redraw itself, and pass its new appearance along to the window manager before it is drawn. When an application stops responding, it may be unable to redraw itself, which sometimes causes the area within the window frame to retain images of other windows when it is brought to the foreground. This problem is commonly seen on Windows XP
Windows XP
Windows XP is an operating system produced by Microsoft for use on personal computers, including home and business desktops, laptops and media centers. First released to computer manufacturers on August 24, 2001, it is the second most popular version of Windows, based on installed user base...

 and earlier, as well as some X window manager
X window manager
An X window manager is a window manager which runs on top of the X Window System, a windowing system mainly used on Unix-like systems.Unlike the Mac OS and Microsoft Windows platforms which have historically provided a vendor-controlled, fixed set of ways to control how windows and panes display...

s.

Another serious limitation that affects almost all stacking window managers is that they are often severely limited in the degree to which the interface can be accelerated by a graphics processing unit
Graphics processing unit
A graphics processing unit or GPU is a specialized circuit designed to rapidly manipulate and alter memory in such a way so as to accelerate the building of images in a frame buffer intended for output to a display...

 (GPU), and very little can be done about this.

Avoiding limitations

Some technological advances have been able to reduce or remove some of the disadvantages of stacking. One possible solution to the limited availability of hardware acceleration is to treat a single foreground window as a special case, rendering it differently from other windows.

This does not always require a redesign of the window manager because a foreground window is drawn last, in a known location on the screen, and is not covered by any other windows. Therefore it can be easily isolated on the screen after it has been drawn. For one, since we know where the foreground window is, when the screen raster reaches the graphics hardware, the area occupied by the foreground window can be easily replaced with an accelerated texture.

However if the window manager is also able to supply an application with an updated image of what the screen looked like before the foreground window was drawn but after all other windows were already drawn more possibilities open up. This would allow the one window in the foreground to appear semi-transparent, by using the before image as a texture filter on the final output. This was possible in Windows XP
Windows XP
Windows XP is an operating system produced by Microsoft for use on personal computers, including home and business desktops, laptops and media centers. First released to computer manufacturers on August 24, 2001, it is the second most popular version of Windows, based on installed user base...

 with software included with many NVidia
NVIDIA
Nvidia is an American global technology company based in Santa Clara, California. Nvidia is best known for its graphics processors . Nvidia and chief rival AMD Graphics Techonologies have dominated the high performance GPU market, pushing other manufacturers to smaller, niche roles...

 GeForce
GeForce
GeForce is a brand of graphics processing units designed by Nvidia. , there have been eleven iterations of the design. The first GeForce products were discrete GPUs designed for use on add-on graphics boards, intended for the high-margin PC gaming market...

 video cards as well as from third party sources, using a hardware texture overlay.

Another method of lessening the limitations of stacking is through the use of a hardware overlay
Hardware overlay
In computing, hardware overlay, a type of video overlay, provides a method of rendering an image to a display screen with a dedicated memory buffer inside computer video hardware. The technique aims to improve the display of a fast-moving video image — such as a computer game, a DVD, or the signal...

 and chroma keying. Since the video hardware
Graphics processing unit
A graphics processing unit or GPU is a specialized circuit designed to rapidly manipulate and alter memory in such a way so as to accelerate the building of images in a frame buffer intended for output to a display...

 can draw on the outgoing screen, a window is drawn containing a known colour, which allows the video hardware to detect which parts of the window are showing and should be drawn on. 3D and 2D accelerated video and animation may be added to windows using this method.

Full screen video may also be considered a way of avoiding limitations imposed by stacking. Full screen mode temporarily suspends the need for any window management, allowing applications to have full access to the video card. Accelerated 3D games under Windows XP
Windows XP
Windows XP is an operating system produced by Microsoft for use on personal computers, including home and business desktops, laptops and media centers. First released to computer manufacturers on August 24, 2001, it is the second most popular version of Windows, based on installed user base...

 and earlier relied totally on this method, as these games would not have been possible to play in windowed mode. However technically this method has nothing to do with the window manager, and is simply a means of superseding it.

Hybrid window managers

Some window managers may be able to treat the foreground window in an entirely different way, by rendering it indirectly, and sending its output to the video card to be added to the outgoing raster
Raster graphics
In computer graphics, a raster graphics image, or bitmap, is a data structure representing a generally rectangular grid of pixels, or points of color, viewable via a monitor, paper, or other display medium...

. While this technique may be possible to accomplish within some stacking window managers, it is technically compositing
Compositing
Compositing is the combining of visual elements from separate sources into single images, often to create the illusion that all those elements are parts of the same scene. Live-action shooting for compositing is variously called "chroma key", "blue screen", "green screen" and other names. Today,...

, with the foreground window and the screen raster being treated the same way two windows would be in a compositing window manager
Compositing window manager
A compositing window manager is a type of window manager. A window manager is software that draws a graphical user interface on a computer display – it positions windows, draws additional elements on windows , and controls how windows interact with each other, and with the rest of the desktop...

.

As described earlier, we might have access to a slightly earlier stage of stacking where the foreground window has not been drawn yet. Even if it is later drawn and set to the video card, it is still possible to simply overwrite it entirely at the hardware level with the slightly out of date version, and then create the composite without even having to draw in the original location of the window. This allows the foreground window to be transparent, or even three dimensional.

Unfortunately interacting with objects outside the original area of the foreground window might also be impossible, since the window manager would not be able to determine what the user is seeing, and would pass such mouse clicks to whatever programs occupied those areas of the screen during the last stacking event.

X Window System

Stacking window managers under the X Window System
X Window System
The X window system is a computer software system and network protocol that provides a basis for graphical user interfaces and rich input device capability for networked computers...

 have the same limitations as any other stacking window manager on any other platform except one: they are fully interchangeable. With the addition of XComposite, this parenting information may be used in different ways, including the implementation of compositing window manager
Compositing window manager
A compositing window manager is a type of window manager. A window manager is software that draws a graphical user interface on a computer display – it positions windows, draws additional elements on windows , and controls how windows interact with each other, and with the rest of the desktop...

s, or ignored as the case may be with tiling window manager
Tiling window manager
In computing, a tiling window manager is a window manager with an organization of the screen into mutually non-overlapping frames, as opposed to the more popular approach of coordinate-based stacking of overlapping objects that tries to fully emulate the desktop metaphor.-Xerox PARC:Although the...

s, but regardless of its presence or absence full application support is maintained, allowing virtually all programs written for one window manager to work seamlessly with any other. The following window managers provide stacking window functionality:

Microsoft Windows

Microsoft Windows has used stacking window management since version 2.0, with the addition of overlapping windows. Prior to that, Microsoft Windows used a tiling window manager
Tiling window manager
In computing, a tiling window manager is a window manager with an organization of the screen into mutually non-overlapping frames, as opposed to the more popular approach of coordinate-based stacking of overlapping objects that tries to fully emulate the desktop metaphor.-Xerox PARC:Although the...

. This window manager has remained virtually unchanged since then.

Microsoft Windows XP still exclusively uses a stacking window manager, which has presented severe limitations to its ability to display hardware-accelerated content inside normal windows, although it is technically possible to produce some visual effects using third-party software. Microsoft Windows Vista
Windows Vista
Windows Vista is an operating system released in several variations developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...

 abandoned this technology in favor of a compositing window manager
Compositing window manager
A compositing window manager is a type of window manager. A window manager is software that draws a graphical user interface on a computer display – it positions windows, draws additional elements on windows , and controls how windows interact with each other, and with the rest of the desktop...

.

History

  • 1970s: The Xerox Alto
    Xerox Alto
    The Xerox Alto was one of the first computers designed for individual use , making it arguably what is now called a personal computer. It was developed at Xerox PARC in 1973...

     which contained the first working commercial GUI
    Gui
    Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...

     used a stacking window manager.
  • Early 1980s: The Xerox Star
    Xerox Star
    The Star workstation, officially known as the Xerox 8010 Information System, was introduced by Xerox Corporation in 1981. It was the first commercial system to incorporate various technologies that today have become commonplace in personal computers, including a bitmapped display, a window-based...

    , successor to the alto, used tiling
    Tiling window manager
    In computing, a tiling window manager is a window manager with an organization of the screen into mutually non-overlapping frames, as opposed to the more popular approach of coordinate-based stacking of overlapping objects that tries to fully emulate the desktop metaphor.-Xerox PARC:Although the...

     for most main application windows, and used overlapping only for dialogue windows removing the need for full stacking.
  • Mac OS
    Mac OS
    Mac OS is a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems. The Macintosh user experience is credited with popularizing the graphical user interface...

     was one of the earliest commercially successful examples of an GUI
    Gui
    Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...

     which used stacking windows.
  • GEM
    Graphical Environment Manager
    GEM was a windowing system created by Digital Research, Inc. for use with the CP/M operating system on the Intel 8088 and Motorola 68000 microprocessors...

     1.1 predated Microsoft Windows and used stacking, allowing all windows to overlap. As a result of a lawsuit by Apple, GEM was forced to remove the stacking capabilities.
  • Amiga OS contains an early example of a highly advanced stacking window manager.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK