Windows
What is usually called a window in most graphical user interfaces is called a top-level window in the X Window System. The term window is also used to denote windows that lie within another window, that is, the subwindows of a parent window. Graphical elements such as buttons, menus, icons, etc. can be realized using subwindows.
A client can request the creation of a window. More precisely, it can request the creation of a subwindow of an existing window. As a result, the windows created by clients are arranged in a tree (a hierarchy). The root of this tree is the root window, which is a special window created automatically by the server at startup. All other windows are directly or indirectly subwindows of the root window. The top-level windows are the direct subwindows of the root window. Visibly, the root window is as large as the virtual desktop, and lies behind all other windows.
The content of a window is not always guaranteed to be preserved over time. In particular, the window content may be destroyed when the window is moved, resized, covered by other windows, and in general made totally or partly non-visible. In particular, content is lost if the X server is not maintaining a backing store of the window content. The client can request backing store for a window to be maintained, but there is no obligation for the server to do so. Therefore, clients cannot assume that backing store is maintained. If a visible part of a window has an unspecified content, an event is sent to notify the client that the window content has to be drawn again.
Every window has an associated set of attributes, such as the geometry of the window (size and position), the background image, whether backing store has been requested for it, etc. The protocol includes requests for a client to inspect and change the attributes of a window.
Windows can be InputOutput
or InputOnly
. InputOutput
windows can be shown on the screen and are used for drawing. InputOnly
windows are never shown on the screen and are used only to receive input.
The decorative frame and title bar (possibly including buttons) that is usually seen around windows are created by the window manager, not by the client that creates the window. The window manager also handles input related to these elements, such as resizing the window when the user clicks and drags the window frame. Clients usually operate on the window they created disregarding the changes operated by the window manager. A change it has to take into account is that re-parenting window managers, which almost all modern window managers are, change the parent of top-level windows to a window that is not the root. From the point of view of the core protocol, the window manager is a client, not different from the other applications.
Data about a window can be obtained by running the xwininfo
program. Passing it the -tree
command-line argument, this program shows the tree of subwindows of a window, along with their identifiers and geometry data.
Read more about this topic: X Window System Core Protocol
Famous quotes containing the word windows:
“I know some lonely houses off the road
A robberd like the look of,
Wooden barred,
And windows hanging low,”
—Emily Dickinson (18301886)
“and then it was
There interposed a Fly
With Blueuncertain stumbling Buzz
Between the lightand me
And then the Windows failedand then
I could not see to see”
—Emily Dickinson (18301886)
“Among a hundred windows shining
dully in the vast side
of greater-than-palace number such-and-such
one burns
these several years, each night
as if the room within were aflame.”
—Denise Levertov (b. 1923)