#
# 		Copyright IBM Corporation 1987
# 
#                       All Rights Reserved
# 
# Permission to use, copy, modify, and distribute this software and its 
# documentation for any purpose and without fee is hereby granted, 
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permission notice appear in 
# supporting documentation, and that the name of IBM not be
# used in advertising or publicity pertaining to distribution of the
# software without specific, written prior permission.  
# 
# IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
# IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
#
#
# $Header: README,v 1.1 88/09/16 11:56:39 ajp Exp $ 
# $ACIS:README 1.5$ 
# $Source: /afs/andrew.cmu.edu/itc/src/andrew/overhead/cwm/RCS/README,v $ 

Cambridge Window Manager (cwm)
Second Release 
June 15, 1987

<==><==><==><==><==><==><==><==><==><==><==><==><==><==>

The interface for moving columns (window boundaries) is unchanged
from the first release. 

A new test program, proptest, demonstrates that clients may change
properties AFTER their window is mapped. Clicking the left, middle and right
buttons will increment the program name, title and host name respectively
(this tests the respective stub routines and the window manager).

Refresh (on the All Windows menu) will invoke /usr/X/bin/refresh
or whatever is specified by the RefreshCommand preference.

Zap (on the This WIndow menu) does NOT kill the client (XKillClient does
not work). Instead it destroys the client's window which usually leads to
client death (although it is often a long and painful one).

Exposing hidden windows works properly.

There are many small "odd things" that often happen when running with cwm
(window borders disappear, server gets VERY confused about clipping
rectangles, strange button events, etc). We assume these will be worked 
out in future releases of the server.

<==><==><==><==><==><==><==><==><==><==><==><==><==><==>

Cambridge Window Manager (cwm)
First Release

June 1, 1987

<==><==><==><==><==><==><==><==><==><==><==><==><==><==>

This is a preliminary release of the Cambridge Window Manager.
We expect to release an update by or on June 15, 1987.

cwm takes the same display parameters as wm .Since only a server for 
the APA-16 exists invoke cwm with no parameters or as cwm -A.

cwm checks for another window manager and will exit if one is detected.

If cwm is invoked as the first X client, a greeting screen will be presented
and normal processing of the "startup" preference will be done. Otherwise, 
cwm will not display a greeting screen and will not perform "startup" 
preference processing.

Many of the wm preferences that we did not commit to support do in fact work.
These remain officially unsupported.

There are some things inherited from wm that are unused and will be stripped out.

A small test program, xtypescript served as our prototype of a BE2/X client.
It uses the stubs and will have a complete title bar when invoked under cwm.
We would have liked to test with actual BE2/X clients but they were unavailible.


KNOWN PROBLEMS

Moving column boundaries (split windows) works but the current interface
is different from wm. This should be better in the update. A few points here:
 
	Because of the implementaion, moving boundaries works better
	when the cursor is between two windows as oppsed to between
	a window and a gray area.

	The cursor will change shape AFTER the middle button is pressed.

If a client wants to use the stubs to define window properties, this should be done
BEFORE the window is mapped. In the update, it will not matter.

Exposing a hidden window will bring the title bar back but the client window
remains undisplayed. The window manger is now in a strange state that does 
not really know about the title bar. To get out of this, simply click the right button
twice (a move operation) and things will be fine.

Redisplay (on the window manager's menu) is unimplemented. 

PREFERENCES

Remember that as any good X application should, cwm gets its
preferences from the (ill-named) file .Xdefaults. The format is however
the same.

Also cmenu preferences for the window manager's menus must be 
specified with cwm as the program name:

	cwm.PaneFont:andysans22b


DIFFERENCES FROM WM

The only intentional difference between cwm and wm concerns the
"application-name.column" preference.

In wm, if typescript windows are to go to column 3, the preferences
file would contain the line:

	typescript.column:3

In cwm, the line would be:

	cwm.typescriptcolumn:3

This is not unreasonable. This is in fact a window manager
preference. Appliations do not ever care what column they are 
supposed to go into at startup.

Also Zap (on the window manager's menu) kills the window manager
but not the clients. This proved to be more useful (at least during development)
and can easily change.


STUBS

As described in the Functional Spec and Design Notes, several
short utility routines are provided for application convenience.
They are gathered together into a small library libcwm.a (in cwm/stubs).

	cwm_SetTitle (display, window, string)
	cwm_SetHost (display, window)
	cwm_SetHelp (display, window, string)

cwmInvokeMenu is intended to replace a client's call to cmenuActivate.
It forces pane and selection to be zero, and sets the menu exit event to be
a release on the middle button. 

	int
	cwmInvokeMenu (XDisplay, menu, x, y, pane, selection, data)
	Display *XDisplay;
	cmenu *menu;
	int x,y;
	int *pane, *selection;
	char **data;

As an added bonus we have included an all-in-one stub

	cwmInitialze (display, window, Name, Title, Host, Help).

Now existing X clients can look good under cwm with the addition of a single
line of code (and linking with libcwm.a).


NOTE: cwm uses Andrew fonts. be sure they are installed.
