[Contents] [Index] [Next] [Previous]

Window Support


Users communicate with applications by using windows. A window is an area of the screen (usually rectangular) that provides the user with the functional means to communicate with an application and through which an application can communicate with the user.

A typical environment has several applications in operation simultaneously. Each application typically has a main or primary window that displays data and in which the user carries on primary interaction with the application. Applications can have additional windows to communicate context-specific interactions with the user of the application. These additional windows are called secondary windows, or transient windows. DialogBoxes are often used to create secondary windows. A typical OSF/Motif environment is shown below.

While each application can be made up of many windows, each window is one of only three basic types:

A window manager must support multiple applications, each with one or more primary windows. The window manager must also recognize and support secondary windows. Also, it must associate each secondary window with a primary window or another secondary window.

Primary Window

A primary window is the window from which all the other windows used by an application are generated. The window manager must support one or more primary windows for each windowing application. When an application has multiple primary windows, the window manager should treat each primary window as if it were an independent application.

When a primary window is iconized (minimized), the window and all of its associated secondary windows must be removed from the display and replaced with a single icon representing the primary window. Iconizing a window must not automatically suspend any processes of the window. However, a client can notice that a primary window has been unmapped and adjust its processing accordingly. When the icon of the window is opened, the primary window and all the current associated secondary windows must be restored. The window manager should try to place the windows in the same position from which they were iconified.

When a primary window is closed, the window and its icon must be removed from the display. All secondary windows associated with the primary window must also be closed. If the last primary window of an application is closed, the application must also be closed. When an explicit focus policy is in use, any secondary windows holding a TearOff Menu can be removed from the display, except when another window of the application has the focus.

Secondary Windows (Dialog)

Applications use secondary windows to conduct context-specific dialog with the user. Such context-specific dialogs are usually transitory, and the secondary windows can be removed when they are no longer needed. When a secondary window is closed, its parent must not be affected, and any secondary windows that are children of it must also be closed.

Secondary windows are always related to a parent window. Sometimes the parent is a primary window, sometimes another secondary window. Any window can have any number of secondary window children.

Secondary windows are not constrained to be clipped within their parent window, but they must always appear on top of that parent window in the window hierarchy. In a layered window manager, you can think of a primary window and its associated secondary windows as occupying one layer in the window hierarchy. Whenever one window is moved in the hierarchy, all of the associated windows must move accordingly. Thus, lowering a window must move that window and all associated windows to the bottom of the window hierarchy. Giving a window the focus must raise that window and all of the associated windows to the top of the hierarchy.

Secondary windows can limit how a user can interact with windows in order to force the order of interaction. A window manager must support the following four types, known as modes, of interaction with secondary windows:

Modeless
Allows interaction with the secondary window and all other windows.
Primary modal
Does not allow interaction with any ancestor of the window.
Application modal
Does not allow interaction with any window created by the same application, even if the application has multiple primary windows.
System modal
Does not allow interaction with any window on the screen. This includes windows from all other applications and any icon box. To indicate a system modal secondary window, the pointer should change shape to a caution pointer whenever it leaves the system modal secondary window.
A window manager must not allow the focus to be given to any window that is not allowed to accept input because of the modality of a DialogBox.

Menu Windows

Menu windows are used to present Menus. They are not specifically created by applications but by the components used to create the application. Menu windows are always related to a parent window. The parent can be either a primary window, secondary window, or another Menu window. A window can only have one Menu window child at a time.

A Menu window is very short lived. It is only available to a client while no mouse or button actions are being performed elsewhere on the screen. Once interaction starts in another window on the screen, except a child Menu window, the Menu window must be removed.

Some Menus have a special behavior that allows a user to convert them into a secondary window. These Menus are called TearOff Menus. TearOff Menus can either be torn off in place or torn off and moved simultaneously. The window's title should be the name of the Menu entry that was torn off. The window manager must allow TearOff Menu transformations from Menu window to secondary window.

Menu windows are not constrained to be clipped within their parent window, but they must always appear on top of that parent window in the window hierarchy. The window manager must not supply any window decoration to Menu windows.