GNU Info

Info Node: (sawfish.info)Session Management

(sawfish.info)Session Management


Next: FAQ Prev: Standard Properties Up: Top
Enter node , (file) or (file)node

Session Management
******************

   Sawfish has fully integrated support for the X session management
protocols. Also, this support is extensible to allow all Lisp modules
to save and reload their own window state.

   There are two methods of doing this. If the module only wants to save
and restore the values of properties in each window's property list
(i.e. those values set via `window-put'), then the following function
may be used:

 - Function: sm-add-saved-properties &rest properties
     Arrange for all symbols PROPERTIES to be saved and loaded with the
     session.

   If a Lisp module chooses to use this method it may add a function to
the `add-window-hook' to act on the reloaded properties when the
session is reloaded.

   For more complex window properties that can't be saved straight from
the window's plist two hooks are available:

 - Variable: sm-window-save-functions
     A list of functions, each of which is called when the state of each
     window is saved. Each function is called with a single argument
     (the window) and should return a list of alist elements that will
     be saved in the state file. (As such, only values with valid read
     syntaxes may be included.)

 - Variable: sm-restore-window-hook
     List of functions called when the state of a window is restored.
     Each is called with arguments `(WINDOW ALIST)', where ALIST
     defines the state saved for the window.

     Each function should look for the properties it saved, and then
     take any action dependent on the values.

   The following hook is also called.

 - Variable: sm-after-restore-hook
     Hook called after loading a saved session.


automatically generated by info2www version 1.2.2.9