Root window

Last updated
A possible placement of some windows: 1 is the root window, which covers the whole screen; 2 and 3 are top-level windows; 4 and 5 are subwindows of 2. Some X windows.svg
A possible placement of some windows: 1 is the root window, which covers the whole screen; 2 and 3 are top-level windows; 4 and 5 are subwindows of 2.

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.

Contents

Since every window covers the part of its parent it is staying on, all other windows appear to be above the root window. As a result, the root window is visible as the part of the screen that is behind all other windows. In other words, the root window forms the background of the screen. An image can be used as the wallpaper of the screen by setting it as the background image of the root window. This can be done for example using the xsetroot or the xv programs.

The direct children of the root window are called top-level windows. These windows are usually drawn with a decorative frame and a title bar (which are actually added by the window manager). The top-level windows are, informally, the regular windows in the terminology of most GUIs. The windows that are not top-level are used for buttons, textboxes, etc.

The properties of the root window are sometimes used as a rudimentary form of inter-client communication means. For example, the cut buffers are properties of the root window that are used for copying selected text from a window to another, and the dwm window manager displays the root window's name in a status area. The X resources are also stored, during execution, in a property of the root window.

Virtual root window

The swm window manager introduced the virtual root window. From the point of view of the X protocol, this is a regular window. However, X window managers using the virtual root window reparent all windows to it instead of to the real root window. Virtual root windows are mainly used by re-parenting window managers, for example, for realizing a number of virtual desktops the user can switch between.

Other clients (beside the window manager) may need to use the virtual root window. The identifier of this window can be found in a window property named __SWM_VROOT in a direct child of the real root window. Technically, many programs use the macros for finding the root windows as redefined by an include file named vroot.h.

The freedesktop window manager specification requires a property named _NET_VIRTUAL_ROOTS of the real root window to contain a list of the windows that are acting as virtual root windows; the virtual root window that is currently active can be found in the property _NET_CURRENT_DESKTOP of the real root window.

The virtual root window is used by the window managers swm, tvtwm, amiwm, and enlightenment. Other systems such as KDE use a virtual background window (which contains the icons, for example) but do not reparent the other windows to this one. The virtual root window is also used by XScreenSaver: when the screensaver is activated, this program creates a virtual root window, places it at the top of all other windows, and calls one of its hacks (modules), which finds the virtual root window and draws in it.

Utilities that use the root window

See also

Related Research Articles

<span class="mw-page-title-main">X Window System</span> Windowing system for bitmap displays on UNIX-like systems

The X Window System is a windowing system for bitmap displays, common on Unix-like operating systems.

<span class="mw-page-title-main">X window manager</span> 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.

<span class="mw-page-title-main">Windowing system</span> Software that manages separately different parts of display screens

In computing, a windowing system is a software suite 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.

<span class="mw-page-title-main">Virtual Network Computing</span> Graphical desktop-sharing system

Virtual Network Computing (VNC) is a graphical desktop-sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely control another computer. It transmits the keyboard and mouse input from one computer to another, relaying the graphical-screen updates, over a network.

<span class="mw-page-title-main">Window manager</span> 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.

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.

<span class="mw-page-title-main">Virtual desktop</span> User interfaces describe ways in which virtual space of a computers desktop is expanded

In computing, a virtual desktop is a term used with respect to user interfaces, usually within the WIMP paradigm, to describe ways in which the virtual space of a computer's desktop environment is expanded beyond the physical limits of the screen's display area through the use of software. This compensates limits of the desktop area and is helpful in reducing clutter of running graphical applications.

<span class="mw-page-title-main">Xlib</span> Client library for the X Window System

Xlib is an X Window System protocol client library written in the C programming language. It contains functions for interacting with an X server. These functions allow programmers to write programs without knowing the details of the X protocol.

D-Bus is a message-oriented middleware mechanism that allows communication between multiple processes running concurrently on the same machine. D-Bus was developed as part of the freedesktop.org project, initiated by GNOME developer Havoc Pennington to standardize services provided by Linux desktop environments such as GNOME and KDE.

<span class="mw-page-title-main">Tiling window manager</span> Window manager with non-overlapping frames

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 common approach of coordinate-based stacking of overlapping objects (windows) that tries to fully emulate the desktop metaphor.

<span class="mw-page-title-main">X Window selection</span>

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.

Xvfb or X virtual framebuffer is a display server implementing the X11 display server protocol. In contrast to other display servers, Xvfb performs all graphical operations in virtual memory without showing any screen output. From the point of view of the client, it acts exactly like any other X display server, serving requests and sending events and errors as appropriate. However, no output is shown. This virtual server does not require the computer it is running on to have any kind of graphics adapter, a screen or any input device. Only a network layer is necessary.

In the X Window System, an X session manager is a session management program, a program that can save and restore the current state of a set of running applications, including window manager.

In the X Window System, the X resources are parameters of computer programs such as the name of the font used in the buttons, the background color of menus, etc. They are used in conjunction with or as an alternative to command line parameters and configuration files.

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.

A compositing manager, or compositor, is software that provides applications with an off-screen buffer for each window. The compositing manager composites the window buffers into an image representing the screen and writes the result into the display memory. A compositing window manager is a window manager that is also a compositing manager.

<span class="mw-page-title-main">Directory (computing)</span> File system structure for locating files

In computing, a directory is a file system cataloging structure which contains references to other computer files, and possibly other directories. On many computers, directories are known as folders, or drawers, analogous to a workbench or the traditional office filing cabinet. The name derives from books like a telephone directory that lists the phone numbers of all the people living in a certain area.

Extended Window Manager Hints, a.k.a. NetWM, is an X Window System standard for the communication between window managers and applications. It builds on the functionality of the Inter-Client Communication Conventions Manual (ICCCM).

<span class="mw-page-title-main">Wayland (protocol)</span> Display system intended to replace X11

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.

In computing, SPICE is a remote-display system built for virtual environments which allows users to view a computing "desktop" environment – not only on its computer-server machine, but also from anywhere on the Internet – using a wide variety of machine architectures.

References