The pack and unpack algorithms work similarly. The pseudo-code algorithms
of the pack (PackWindow) and unpack operations (
UnPackWindow) are listed in Appendix . Basically,
the algorithm starts from the window to be packed and climbs up the
hierarchy making nodes packed (unpacked) ( i.e. set M to be 1 (0) ) as
long as they are G-Nodes with a single child. The algorithms end with
the propagation of the effects of the operation to the lower level
windows. The PropagateChanges function takes care of updating
the coordinates of the packed window to be of fixed width or height
depending on the type of the window.