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 came on a great house in the middle of the night
Its open lighted doorway and its windows all alight,
And all my friends were there and made me welcome too;
But I woke in an old ruin that the winds howled through;
And when I pay attention I must out and walk
Among the dogs and horses that understand my talk.”
—William Butler Yeats (18651939)
“But let my due feet never fail
To walk the studious cloisters pale,
And love the high embowed roof,
With antic pillars massy proof,
And storied windows richly dight,
Casting a dim, religious light.”
—John Milton (16081674)
“The house of my body has spoken
often as you rebuild me like blocks,
and promise to come visit
when Im finally adjusted on safe land,
and am livable, joist to joist
with storm windows and screens ...”
—Anne Sexton (19281974)