Window Placement
Sawfish supports multiple ways of placing new windows on the display.
There is a "current" placement mode for normal windows, and another
mode for transient windows.
| place-window-mode
|
Variable |
A symbol indicating the method of placing normal windows. This
defaults to top-left.
|
| place-transient-mode
|
Variable |
A symbol indicating the method of placing transient windows. This
defaults to centered-on-parent.
|
| placement-mode name
|
Function |
|
Return the placement mode object corresponding to name.
|
|
List of names of all placement modes. Sawfish 1.3 ships with the
following placement modes:
Make no changes to the window's position. The window remains wherever
the X server placed it initially.
|
In all of these placement modes, the mode is responsible for taking
the window object as an argument, and manipulating its position with,
e.g., move-window-to.
| stagger-placement-step
|
Variable |
In stagger placement mode, the distance down and to the right
from the previously placed window to the new one. This is measured
in pixels.
|
There are two circumstances in which Sawfish will place a window:
either the window has just been created, or Sawfish has begun managing
the window's display. In the latter case, the window will have the
placed property.
| ignore-program-positions
|
Variable |
When t, program position size hints are not considered when
placing windows.
|
"Avoided" windows should be kept unobscured by other windows
wherever possible. In particular, first-fit and best-fit methods will
attempt to place new windows away from them, and maximized windows
will not stretch over them.
| window-avoided-p window
|
Function |
|
Return t if window should be kept unobscured by other windows
wherever possible.
|
| avoided-windows &optional window
|
Function |
|
Returns a list of all windows that should be left unobscured where
possible. If window is defined, then it defines a window that
will be never returned in the list.
|
| dont-avoid-ignored
|
Variable |
|
When non-nil, ignored windows aren't avoided by default. Defaults to
non-nil.
|
| avoid-by-default
|
Variable |
|
When non-nil, any unspecified windows are avoided by default.
Defaults to nil.
|
You can define your own placement modes.
| define-placement-mode name fun &keywords for-normal for-dialogs
|
Function |
|
Define a new window placement mode called name (a symbol). The
function fun will be called with a single argument when a window
should be placed using this mode. The single argument is the window
to be placed.
If the for-normal keyword is t, then this placement mode
is marked as valid for place-window-mode. The same applies to
for-dialogs and place-transient-mode.
|
| autoload-placement-mode name module-name &keywords for-normal for-dialogs
|
Function |
Define placement mode name (a symbol) to be loaded from
structure structure-name (a symbol) when first referenced. The
keyword-args are passed along to the call to
define-placement-mode that creates the placement mode.
|