WM(1)

NAME
wm - a simple real-estate-driven window manager

SYNOPSIS
wm [-display display]

DESCRIPTION
Wm is a very primitive overlapping window manager for X11. It was developed to help with the debugging of the X11 server; we do not suggest that the user interface presented here is a desired one, and we do not suggest that you try to use this program on a regular basis.

Wm decorates each mapped appliction window with a banner. The banner consists of four fields. Left-to-right, they are:

Circulate button - A command button which causes the window to change its position in the stacking order.

Title region - An area in which an applications name or other specified information is displayed. It is also used by the user to move the window.

Iconize button - A command button which causes the window to be replaced by an icon.

Resize button - A command button which allows the user to change the size of the window.

Wm supports the following user actions:

Raising or lowering a window in the stack of windows
Locating the pointer cursor in the Circulate box of a partially obscured window and clicking with any pointer button will raise this window to the top of the stack of windows so that it is no longer obscured. Locating a pointer cursor in the Circulate box of a window which is currently on top of the window stack will send the window to the bottom of the stack.

Iconizing a window
Locating the pointer cursor in the Iconize box and clicking any pointer button will cause the window to be unmapped, and the associated icon to become mapped. The icon will appear at its last location, or, if this window has never been iconized, under the cursor. However, if the client program initially set an icon position in the WM_HINTS property, then that icon position will be used instead as the initial icon position. To position an icon while iconizing the window, locate the cursor in the Iconize box and press down any pointer button. A rubber-band outline of the icon will appear under the cursor. While holding down the pointer button, drag the cursor to the desired location for the icon. The outline will follow the cursor on the screen. When the outline moves to the desired location for the icon, release the pointer button. The client window will be unmapped, and its icon will appear at the desired location. To cancel this operation while the pointer button is down, click another pointer button.

Deiconizing an icon
Locating the pointer cursor in an icon and clicking any pointer button will cause the icon to be unmapped, and the associated window to become mapped. To cancel this operation while the pointer button is down, click another pointer button.

Moving a window on the screen
Locating pointer cursor in the area of the title region and pressing any pointer button causes a "rubber-band" outline of the window to appear. As the user moves ("drags") the cursor (while holding down the pointer button), the outline moves accordingly. When the button is released, the window is repainted in the last location of the rubber-band outline. If the user presses another pointer button during the drag, the operation is cancelled, the rubber-band outline disappears, and the window is not moved. Note that a portion of the title region is constrained to remain on the screen.

Resizing a window.
Locating the pointer cursor in the resize box and pressing any pointer button initiates the spring-loaded resize mode. Then as soon a the cursor touches a border (while the pointer button is down), that border becomes a rubber-band line which follows the cursor until the button is released. If the cursor then touches an adjacent border, that border also becomes a rubber-band line, and the window can be resized in two dimensions at once. If the cursor touches a border after having touched the opposite border, the first border touched reverts to its original location, and the other one becomes a rubber-band line which follows the cursor. If the user presses another pointer button during the drag, the operation is cancelled, the rubber-band outline disappears, and the window does not change size. Note that the pointer cursor has to touch a border to initiate th resize action. As in the move operation, a protion of the title region is constrained to remain on the screen.

Moving an icon on the screen
To move an icon, press the Shift key and hold it, then position the pointer cursor in the icon, press any pointer button, and proceed dragging an outline of the icon around by moving the pointer cursor (with the pointer button down). When the outline moves to the desired position, release the pointer button and the Shift key. To cancel, click another pointer button during the drag; the icon will not move.

NOTES FOR CLIENT PROGRAMS
Wm uses the WM_ICON_NAME, WM_NAME, and WM_HINTS properties. It keeps the name in the Title region updated as the WM_NAME property changes. It keeps the name in the icon updated as the WM_ICON_NAME property changes; if a client does not set the WM_ICON_NAME property, wm will use the WM_NAME property for the icon name. Wm allows only text icons, and sets the icon sizes to accommodate the icon name. The maximum name length for both the icon name and the Title region name is 100 characters.

Of the WMHints, wm ignores all but icon_x and icon_y, which it uses for initial icon placement. These need to be set by the client before its window is mapped, because wm reads them only once, when it first encounters the window.

SEE ALSO
X(1), Inter-Client Communication Conventions Manual

BUGS
This program does not necessarily implement the current window manager protcols.

DIAGNOSTICS
If you try to run wm while you are already running a window manager, wm will let you know.

COPYRIGHT
Copyright 1988, Massachusetts Institute of Technology.
See X(1) for a full statement of rights and permissions.

AUTHOR
Hania Gajewska, DEC WSL Dave Rosenthal, Sun Microsystems