Moving and Resizing Windows
As noted above (see Window Attributes), the
window-dimensions and window-position functions return
the current configuration of a window.
| move-window-to window x y
|
Function |
|
Move the top-left corner of the window frame of window to
(x, y).
|
| resize-window-to window width height
|
Function |
|
Set the dimensions of the client window associated with object
window to (width, height).
|
| move-resize-window-to window x y width height
|
Function |
|
Move the top-left corner of the window frame of window to
(x, y), and set the dimensions of the frame to
(width, height).
|
| resize-window-with-hints window cols rows &optional hints
|
Function |
| resize-window-with-hints* window width height &optional hints
|
Function |
|
Resize the window associated with object window so that it has
certain X and Y dimensions. For the first function, the dimensions
are cols columns and rows rows. For the second function,
the dimensions are width pixels and height pixels.
The hints parameters is either the size hints alist to use, or
nil in which case the window-size-hints function is used
to retrieve the window's hints.
|
Usually, however, it is left to the user to configure windows. The
following functions may be called interactively: their sole argument is
then either the window that received the current event or the currently
focused window.
| move-window-interactively window
|
Command |
|
Move window interactively using the mouse. Releasing any mouse
button places the window at its current position.
|
| resize-window-interactively window
|
Command |
|
Resize window interactively using the mouse. Releasing any mouse
button places the window at its current position.
Note that this function selects the edge or edges of the window to move
from the current position of the mouse when the resizing begins. The
window is divided into a three-by-three grid; the rectangle containing
the mouse pointer gives the direction to resize in. If the pointer is
in the central rectangle the bottom and right edges are moved.
|
| move-selected-window
|
Command |
|
Wait for the user to select a window using the mouse, then
interactively move that window.
|
| resize-selected-window
|
Command |
|
Wait for the user to select a window with the mouse, then interactively
resize that window.
|
The interactive move and resize behavior can be customized through the
following variables:
| move-outline-mode
|
Variable |
A symbol defining the visual method of interactively moving windows.
Current options include box for a wire-frame grid, and
opaque for full redisplay.
|
| resize-outline-mode
|
Variable |
A symbol defining the visual method of interactively resizing windows.
Current options include box for a wire-frame grid, and
opaque for full redisplay.
|
| move-show-position
|
Variable |
|
When non-nil, the current window position is shown in the center of the
screen.
|
| resize-show-position
|
Variable |
|
When non-nil, the window size is shown in the center of the screen.
|
|
When non-nil, the window position is "snapped" to edges of other
windows within close proximity.
|
| move-snap-epsilon
|
Variable |
|
The distance in pixels before snapping together two edges.
|
Windows have a "gravity" property, which affect how they are placed
in particular positions.
| window-gravity window &optional hints
|
Function |
Returns the gravity of window. The order of precedence is Sawfish
gravity window property, explicit hints argument, X
window size hints. The default gravity when nothing else is specified
is north-west (specified by ICCCM).
|