Node:Top,
Next:Copying,
Previous:(dir),
Up:(dir)
This document describes the Lisp programming interface to
sawfish, an extensible X11 window manager.
This is Edition 0.6 of its documentation,
last updated 12 December 1999 for Sawfish version 0.19.
Node:Copying,
Next:Introduction,
Previous:Top,
Up:Top
Copying
Sawfish is copyright (C) 1999 John Harper and is released under the
terms of the GNU General Public License. See the included file
COPYING for the full text of the license (or see Copying).
This is free software - you are welcome to redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or
(at your option) any later version.
Sawfish is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Node:Introduction,
Next:News,
Previous:Copying,
Up:Top
Introduction
Sawfish is a lisp-extensible window manager for X11. Its aim is to
allow all areas of window management (decoration, manipulation) to be
customized as far as is possible, yet still remain as fast or faster
than existing window managers.
Despite this extensibility its policy is very minimal compared to most
window managers. It does not implement desktop backgrounds,
applications docks, or other things that may be achieved through
separate applications.
All high-level window management functions are implemented in Lisp for
future extensibility or redefinition. Also, most received events are
exported to the Lisp environment through key-bindings and hooks,
similar to in Emacs. These events include pointer behavior and many
internal X11 events.
Sawfish uses the librep Lisp environment (see Top), this is a run-time library implementing a
language similar to Emacs Lisp (see Top), but with many extensions, and using lexical
instead of dynamic scope. This manual assumes at least a basic
knowledge of the language.
Node:News,
Next:Colors,
Previous:Introduction,
Up:Top
News
This lists the user-visible changes made to Sawfish, and which releases
they occurred between. For more detailed information see the
ChangeLog files in the Sawfish source tree.
0.31
- Requires librep version
0.13
- Organized all lisp code into a hierarchy of modules. Root points
are
sawfish.wm for window manager code, sawfish.ui for
configurator and sawfish.gtk for GTK+ utilities
Compatibility should have been preserved as far as possible, through
the use of module aliases. The user module that unmodularized
user code is loaded in should look very similar to the old environment.
However, code using private functions, probably will not work
New features written as modules can either import modules individually,
or just open sawfish.wm to get the core functionality
- All command handling is now written in Lisp. It's fully
compatible except for how commands are defined. Since there is no
longer a unified namespace the mapping from names to command
definitions is maintained separately.
define-command and autoload-command add entries to this
mapping. define-command takes a name and a function (and some
other optional arguments). The old style of defining commands still
works, but only in the user module
sawfish-client now provides the same repl as the normal
rep program. E.g. this allows the module system to be easily
inspected
Also, the module of each loaded theme is available for inspection under
themes.theme-name. (With themes using top-level defines
instead of a single let* block, this is useful for debugging)
sawfish.client module provides lisp functions for
communicating with a running window manager. Also, the protocol has
been modified to support proper communication of errors, which are then
re-raised on the client-side. This should make debugging client-server
code more obvious
- `Action' parts of menu items may now be lisp objects that don't
have a read syntax. (E.g. this allows closures to be used, avoiding the
problems arising from modularization)
- Handle
ConfigureRequest events in a way that is compliant
with the ICCCM--honour the window's win_gravity setting
(defaulting to NorthWest gravity), instead of assuming
Static gravity
- Support more GC attributes in the
sawfish.wm.util.x plugin
(Ryan Pavlik)
- Support for handling arbitrary windows as extra "root" windows.
Used, e.g., to support Nautilus' desktop window. Allows the focus modes
to work correctly
To support this, new window property desktop denoting a
"desktop" window; new function desktop-window-p recognizing
one of these things (or the symbol root)
- Added
pointer-motion-threshold option. Pointer motion
events are only generated when the pointer moves at this many pixes
away from the position it had when the button was pressed
- New functions:
scale-image, composite-images, and
crop-image.
- New option
maximize-avoid-avoided (Jonas Linde)
- New functions exported by
sawfish.wm.ext.tooltips module:
display-tooltip, remove-tooltip
- New function exported from
sawfish.wm.viewports module:
select-workspace-and-viewport. Renamed some workspace functions:
ws-move-window => move-window-to-workspace,
ws-copy-window => copy-window-to-workspace,
ws-insert-workspace => insert-workspace,
ws-move-workspace => move-workspace,
ws-remove-window => remove-workspace.
- Changed interface of
get-visible-window-edges function to
use proper keyword parameters, and added some new keywords
- New commands
help:about and gnome-about. Added a
sawfish-about script to implement the first of these. Added
associate menu items to the `Help' menu
- Translation additions and updates: es (Iñaki García Etxebarria),
tr (Fatih Demir), zh_CN.GB2312 (zw@zhaoway.com), fr (Christian
Marillat), ja (SATO Satoru), de (Kai Lahmann), el (Simos Xenitellis),
ga (Seán Ó Ceallaigh), ru (Valek Filippov), sl (Andraz Tori)
- Bug fixes:
- initialize event handler when creating X window proxies (Matt
Tucker)
- No longer able to
throw out the top of the program by
mistake
- Fixed
find-head function, to allow Xinerama support to
work
- When exiting, leave window configurations exactly as they were
found (E. Jay Berkenbilt)
- Fixed
synthesize-event to scan the window tree for a child
window accepting button events (E. Jay Berkenbilt)
- Removed "yow! ..." debugging messages
image-set and related functions will add an alpha channel
to the image when necessary (when using gdk-pixbuf)
- Canonify S-x as X where possible
- Catch and handle errors when matching properties in the
sawfish.wm.ext.match-window
- Escape underscores in menu items where they shouldn't introduce
accelerators. (Added
quote-menu-item function to help with this)
- Fixed race-condition when exiting configurator embedded into the
GNOME control center (Havoc Pennington, me)
- Fixed bug in
set method of the icon widget
- Fixed shading behaviour of included themes (Daniel Lundell)
0.30.3
- If a frame part has a non-nil
hidden attribute, ignore it
- When reframing windows, keep the absolute position of the client
window constant
- Support
FIXED_POSITION GNOME hint (renamed old
fixed-position property as client-set-position;
fixed-position now means don't allow the window to be moved by
the user)
transients-above option can now be set per-window
- Translation updates: fr (Christian Marillat), en_GB (Robert
Brady), de (Kai Lahmann), da (Keld Simonsen), ru (Valek Filippov), sl
(Andraz Tori), no (Kjartan Maraas), gl (Jesus Bravo Alvarez), it
(Michele Campeotto)
- Fixed bugs when converting option values
- Fixed
:require keyword in defcustom always causing
the module to be loaded, not just when the option is non-nil
- Fixed bug when adding windows that are shaded
- Fixed some minor bugs in the configurator
0.30.2
0.30
- New commands
activate-viewport-column,
activate-viewport-row
- New commands
raise-window-and-transients,
lower-window-and-transients and
raise-lower-window-and-transients,
raise-transients-and-pass-through-click.
As the normal window stacking commands, but restacks the
"transient-group" of the window. This includes the window itself and
any transients it has, and any windows that it itself is a transient
of.
These commands are used in the default keymaps
- Functions that deal with transient windows now understand the de
facto standard of setting the
WM_TRANSIENT_FOR property to the
root window denotes that the window is a transient for the whole group
- New image manipulation functions:
image-ref,
image-set, image-fill, image-map. New color
accessor function color-rgb-8. New function
root-window-id
- Improvements to
sawfish-ui: optionally use some GNOME
widgets, more lisp widget types, some bug fixes
- New command
command-sequence. Allows individual bindings
to invoke a sequence of commands
- Options
iconify-group-mode and uniconify-group-mode
replace iconify-whole-group and uniconify-whole-group.
New commands iconify-transient-group, and
uniconify-transient-group
- Added
:type* key to defcustom, like :type,
but value is left unquoted
- Translation updates: pl (Daniel Koc), ru (Valek Filippov), uk
(Yuri Syrota), es (Iñaki García Etxebarria)
- Fixed handling of
WM_NORMAL_HINTS (was using base-size
instead of min-size in places)
- Fixed further locale / FontSet bug (Tomohiro KUBOTA)
window-history module won't resize a window to a size that
violates its size constraints
0.29
- Rewrote the configuration user interface. Improvements include:
- Key bindings may now include parameters. E.g. this finally allows
shell commands to be bound to keys using the GUI (use the new
run-shell-command command)
- Nautilus-like user-levels to tailor the options shown to the
expertise of the user
- Options may have much richer type descriptions (including
match-window options). Also, extra widget types and containers
may be added as extra Lisp modules
- By default the stand-alone configurator commits changes to the
window manager as they are made, instead of waiting for the
Try
button to be pressed
- Added dependences--options with dependences are only editable
when the value of their dependence is non-
nil
- Rewrote window stacking code to be based on "stacking
predicates"--functions that accept or reject a possible stacking
configuration. This allows the "stack-transients-above-parents"
option to work correctly, only keeping transient windows above their
own parent windows
- The configure-event handler now understands and handles the full
complexity of stacking requests (Brad Thompson)
- New frame-part attribute:
scale-foreground. The
cursor attribute may now be a function
- Made the
centered, centered-on-parent and
under-pointer placement modes clamp the window into the current
work area (i.e. without overlapping windows that shouldn't be covered).
Added a stagger placement mode
- When grabbing window icons to images, preserve their shape masks
- Moved
window-history options to placement group.
Fixed some more bugs and sub-optimal default option values
- Don't set cursors for button classes, use the default value
- GNOME
SKIP_FOCUS window hint sets never-focus
property on window, as well as the ignored property
- Translation updates: de (Karl Eichwalder), ru (Valek Filippov),
da (Kenneth Christiansen)
- Added mostly-complete support for using gdk-pixbuf instead of
Imlib (requires an experimental Xlib version of the gdk-pixbuf library)
- Various bug fixes and other minor changes...
0.28.1
- New options
--visual=TYPE and
--depth=DEPTH. These tell the window manager to use a
different visual than the default
- Made the
window-history module behave more sanely (don't
save iconified or shaded state; include window name when generating
keys for transient windows)
- Made
beos-window-module the standard window menu (require
old-window-menu to get the original version). Also made this
display the windows' class names
- Updated translations: es (Iñaki García Etxebarria), tr (Fatih
Demir)
0.28
- New module
window-history--automatically saves window
attributes when they are explicitly set by the user, then copies these
attributes to windows with the same WM_CLASS as they are
created. This is loaded automatically if you have no .sawfishrc
- New method of allowing themes to implement only some of the
(currently) four frame types. The variable
frame-type-fallback-alist maps each frame type to the type to
try if the original type isn't available in the chosen frame style.
Note that for this to work, themes must return nil when they
don't support the requested frame type, until now, the convention had
been to return the default frame definition, so most if not all themes
will need changing. (This doesn't include themes created using the
make-theme module.)
- Made the metrics used by the
best-fit placement mode
user-controllable. Set the sp-cost-components variable to a list
of cost functions and the weight to apply to that metric. E.g. by
default it gives 50% importance to the distance from the placement to
the focused window, and 25% each to the distance to the pointer and to
the "future-unusefulness" of the area being covered
- New module
beos-window-menu to redefine the window menu to
group items by the window group that they are a member of (in the
absence of actual group information, it will heuristically build groups
by matching window titles)
- New option
edge-flip-warp-pointer, whether or not to warp
the pointer after edge-flipping (Paul Warren)
- New option
display-window:uniconify-to-current-workspace,
controls whether windows uniconified by display-window should be
moved to the current workspace (John N S Gill)
- Changed method of selecting when to use multi-byte aware
rendering functions (except when initializing the locale fails, or
returns a 7-bit locale); also, when creating a fontset fails, try to
intelligently fall back to a similar group of fonts (Tomohiro Kubota)
- The
x library now supports creating and then drawing to
pixmaps. The pixmaps can then be grabbed to images using the
make-image-from-x-drawable function
- Added a
Help item to the root menu
- Translation updates: fi (Antti Ahvensalmi), gl (Jesus Bravo
Alvarez), de (Karl Eichwalder), nl (Jan Nieuwenhuizen), pl (Daniel
Koc), tr (Fatih Demir)
- Now supports the Super modifier
- Fixed bug of sometimes ignoring pending X events
- Fixed bug of calling focus change hooks too many times (only when
our view of the focused window has actually changed)
- Avoid problems when windows set weird size hints structures
- Raise windows after possibly moving them to a different
layer, when they have been mapped
- When the
cycle-windows sequence is terminated by an
unknown event, re-handle that event after exiting (so that e.g.
M-TAB can be followed by another M- qualified event without
releasing Meta)
0.27.2
- Translation updates: da (Kenneth Christiansen), de (Karl
Eichwalder), es (Iñaki García Etxebarria), ja (SATO Satoru)
- Attempt to destructure the language code when parsing GNOME
desktop items (e.g. if
LANG=de_DE look for both de_DE and
de translations)
- New focus handler events
enter-root and leave-root
- Removed
raise-groups-on-focus option, it caused unstable
window flickering in certain cases
- Fixed bug When transferring focus after a window is unmapped
(inverted choice of when to look under pointer, and when to look in
focus history)
0.27
- Changed the name from
sawmill to sawfish; all
user-visible binaries have been renamed appropriately, the old programs
will still work for now...
- Added support for accelerators in menu definitions (this requires
a new rep-gtk package) (Richard Kilgore). Added accelerators to many of
the standard menu items
- Added some (untested) support for Xinerama:
current-head,
current-head-dimensions, current-head-offset. Some
placement modes should handle multiple heads sensibly, as should window
maximization and edge snapping.
- Added icons for GNOME control center applets (all icons by
Tigert, except for the saw-blade logo by Glyph Lefkowitz)
- New functions
map-window-properties (me),
window-icon-image (Bruce Miller)
- Changed behaviour of
raise-group and lower-group to
preserve the stacking of the group, then change the selected window.
Added new command raise-lower-group
- New option
raise-groups-on-focus
- Updated translations: de (Hubert Nachbaur), es (Iñaki García
Etxebarria), gl (Jesus Bravo Alvarez), ko
(Man-Yong Lee), tr (Fatih Demir)
- Try to handle errors more gracefully when creating window frames
- Better handling of errors in the control center applet
- Fixed the
below-client frame-part attribute
- Fixed the disappearing items in the match-windows dialog
- Fixed the non-beautified entries in the keymaps dialog
- Fixed interactive placement mode (Timo Korvola)
- Invoke audio playing program asynchronously, may avoid deadlocks
- Fixed
workspace-menu to add the focus-marking asterisk
(John N S Gill)
- Fixed menu-obscuring bug after auto-raising windows
- Ensure that
WM_STATE property is set each time a window is
mapped, not just the first time
- Fixed bug when discarding grab in click-to-focus mode, even
though successive events may be in the window's keymap
- Only focus windows when they're mapped when they're visible
- Fixed click-to-focus problems when unmapping transient windows
0.26
- Added plugin
selection, adds functions
x-selection-active-p and x-get-selection for retrieving X
selections (Mark Probst)
- New functions
prompt-for-window,
prompt-for-workspace and select-workspace-interactively
(Dave Pearson)
window-anim module enabling asynchronous animations after
window events. Currently only two animation styles wireframe and
solid, and they only animate window iconification
audio-events module; maps window manager events to audio
samples (played using esd by default, but can be configured to use any
program)
- When running programs in terminals from the GNOME apps menu, use
the value of
xterm-program to decide which terminal program to
use (James Antill)
- Translation updates: gl (Jesus Bravo Alvarez), pl (Daniel Koc)
- New command
toggle-window-iconified (Jens-Ulrik Petersen)
- New option
raise-windows-when-unshaded
- Customization options for tooltip colors (Erik Assum)
- Removed default binding to A-x
- Added support for librep-with-module-system (cvs version)
- Note that
ko and zh languages need FontSets
- When sticking a window not on the current viewport, move it to
the current viewport (Merlin)
- Fixed bug (?) of placing over avoided windows in
random
mode; also increased sp-avoided-windows-weight by an order of
magnitude (Dan Winship)
- Fixed bug of maximizing a window changing its viewport
- Fixed window cycling losing grab if originally focused window is
unmapped
- Fixed
get-cursor to use the correct background color when
creating cursors from vectors (Alexander Barinov)
- Fixed
get-font to set `descent' property correctly
- Changed double-buffering semantics in
x plugin, also only
support this if configure finds the correct header files
- Fixed
synthesize-event to generate correct relative
pointer positions
- Don't focus on non-visible windows (crashes GNOME control center)
- Fixed bug of using
cp to install GNOME desktop files
0.25.2
- If no user customization file when saving options, inherit from
the custom-defaults file
- Rewrote window stacking (fixes bugs, more efficient)
- Added
input-focus to theme-callable functions
- When focused window is unmapped, don't try to focus non-visible
windows
- Fixed
display-window when it's applied to iconified
windows
- New variables
fonts-are-fontsets and
fontset-languages-re to work around broken X servers
- Update edges for snapping to when dragging windows across
workspaces or viewports
- When passing keymaps to customization system, filter out, then
later restore, bindings that aren't symbols
- Most commands to move/copy windows between workspaces can now be
told whether to select the destination workspace or not
- In GNOME hints, never place windows on workspaces that don't
exist (from the pager's POV). (Rob Hodges)
- Fixed
ws-move-window to not remove the window if source
and dest are the same (Rob Hodges)
- Fixed
sp-prune-points function (Dan Winship)
- Fixed
move-viewport-to-window to only flip viewports if
window isn't already on the current viewport (Merlin)
- Try to detect and handle system clock being rewound
- Optional second arg to
x-raise-window; added symmetrical
function x-lower-window
- Fixed unix-domain server code assuming atomic writes to sockets
- Added double buffering support to
x module
- Fixed grabs during multi-key sequences; also, print the current
prefix keys if idle during a multi-key sequence
0.25.1
- Only force windows onto the visible screen if they didn't
explicitly set their position
- Redefine
/ in themes to be the quotient function
(integer division), which is what they expect. The divide
function can be used for real division
0.25
- New plugin
x, a basic Xlib binding for creating and
drawing in windows (Merlin, me)
- Added a method of reading textual input from the user from
completion. Provision for completing functions, variables, commands,
files, directories, etc.... Also supports reading passwords. (Topi
Paavola, me)
- Re-enabled the following interactive codes:
a (function),
C (command), D (directory), f (existing file),
F (file), k (event), n (number), N (prefix
or number), s (string), S (symbol), v (variable)
- Support prefix keys in bindings (binding an event to a keymap, or
the name of a keymap, marks that event as a prefix key for the
associated keymap)
- New command
call-command-with-output-to-screen, prompts
for and invokes a command, then displays any output it emitted (bound
to A-x in default keymaps)
- New variable
multi-click-delay, maximum time in
milliseconds between button presses to count as click2 or
click3 events (Martin Blais)
- New option
edge-flip-only-when-moving (Yaron M. Minsky)
- New window cycling commands
cycle-prefix,
cycle-class (Kai Großjohann); can now be bound to events with
more than one modifier (Timo Korvola)
- New command
uniquify-window-name; new property
unique-name. Forces the window to have a unique name
- New commands
size-window-add-column,
size-window-subtract-column, size-window-add-row,
size-window-subtract-row
- Window edge snapping now has three variants:
magnetism
(the old method), attraction and resistance. (Merlin, me)
- New commands
grow-window-{left,right,up,down} and
pack-window-{left,right,up,down} (Kai Großjohann)
- Support the
WM_COLORMAP_WINDOWS protocol
- New functions
synthesize-event, font-ascent,
font-descent, call-with-keyboard-grabbed
- New functions
define-placement-mode and
define-focus-mode--make defining these things easier. Focus
modes are now settable for each window individually
- Made the tree-organised customization groups work better with the
GNOME control center. Add the sawmill capplet desktop entries to the
GNOME programs menu (under Settings). Also, beautify the names
displayed in the bindings widget
- When applicable, load the GNOME applications menu when the wm is
first idle, reduces the latency of displaying the first root menu
- Translation updates: de (Hubert Nachbaur), es (Iñaki García
Etxebarria), ja (Sato Satoru), sv (Andreas Persenius)
- Fix bug of not noticing when the keyboard / pointer / modifier
mappings change
- Fixed
current-event-string function
- Better method of reconfiguring frames when they're resized (helps
opaque resizing)
- Added some kludges to try and break the intermittent lockups some
people have seen
- Made the auto-gravity option work a lot better (John N S Gill,
me)
- Fixed bug where unmapped windows were being included in the
snapping calculation
- Fixed bug when uniconifying windows and merging workspaces
- Fixed bug of warp-cursor-to-window trying to put the pointer
outside the screen boundaries (Merlin)
- Fixed bug of losing keyboard grab when originally focused window
is deleted during
x-cycle command
- Fixed bug of trying to focus unviewable parent windows when
focused window is unmapped
0.24
0.23
- Customization groups are now organized as a tree structure, with
groups able to contain subgroups
- Define the list of features that will be presented to the user in
sawmill-defaults.jl, by calling custom-add-required. If
you have a .sawmillrc you'll need to do this manually
- New function
move-resize-window-to doing a combined
move/resize. New variable synthetic-configure-mutex, when set
holds off sending synthetic ConfigureNotify events to windows
until it's unset (this is held while interactively moving or resizing
windows)
- New hook
after-add-window-hook. Called with a single
parameter, the window that's has just been adopted
- New functions
x-kill-client, delete-window-safely.
send-client-message now groks long integers (i.e. cons cells) in
32-bit data (Timo Korvola)
window-put, window-get, image-put,
image-get, font-put, font-get: use equal to
compare keys, not eq
- New module
error-handler, implements a simple alternative
error handler (and allows the much-maligned beep to be turned off),
requires rep 0.11+
- Allow the pointer-warp position to be defined relative to the
window (Kai Großjohann)
- New module
shade-hover, unshades windows while the pointer
is over them
- Don't automatically warp to the new workspace when opening
windows on a different workspace
- Include iconified sticky windows in the
window-menu,
shorten sticky entries as usual (James Antill)
- Support the
TryExec field in GNOME desktop files (Ian)
- New commands:
raise-or-pass-through-click,
raise-and-pass-through-click-if-focused
- New module
move-cursor, various commands for moving the
mouse pointer; these commands are bound to the cursor keys when moving
or resizing windows
- Translation updates: es (Iñaki García Etxebarria), fr (Fabien
Ninoles), gl (Jesus Bravo Alvarez), ja (Satoru Sato), nl (Jan
Nieuwenhuizen), tr (Fâtih Demir)
- Fix bug of leaving window-name unset when
WM_NAME is a
null text property
- Don't fail catastrophically if unable to open the default font
- Fixed method of truncating maximized window dimensions
- Fixed the match-window
skip-winlist and
skip-tasklist properties I'd stupidly broken
- Fixed bug of trying to edge-flip sticky windows
- Fixed the
move-workspace-forwards and
move-workspace-backwards commands
- Fixed
uniconify-to-current-viewport option
- Fixed infinite-loop bug in
delete-empty-workspaces command
- Avoid generating empty sub-menus when reading GNOME menu tree
0.22
- Window frame parts are now first-class lisp data objects,
allowing a higher level of control by themes
New or updated functions to access frame parts directly:
frame-part-get, frame-part-put,
frame-part-window, frame-part-x-window,
frame-part-position, frame-part-dimensions,
frame-part-state, map-frame-parts,
refresh-frame-part, rebuild-frame-part
Other new functions: refresh-window
- Updated
sawmill-themer to emit code to tell the window
manager that the theme is editable. The wm adds an Edit Theme...
option to the Customize menu when appropriate
- The
call-after-property-changed function can now be given
a list of properties to monitor (James Antill)
- New function
call-after-state-changed, monitors a list of
window states (i.e. things like iconified, shaded, ...) and calls a
function when any of them change. The window-state-change-hook
now has a second argument (apart from the window), the list of symbolic
states that changed (James Antill)
- Add support for
skip-winlist and skip-tasklist to
the window matcher when GNOME support is enabled (Ben Liblit)
- Integrated patch supporting multi-byte languages from the Kondara
MNU/Linux distribution (forwarded by Yukihiro Nakai)
- Translation updates: de (Christoph Rauch), es (Iñaki García
Etxebarria), gl (Jesus Bravo Alvarez), ja (Satoru Sato), tr (Fâtih
Demir)
- Use a combo box in the configurator to display the list of
themes (it gets given scroll bars when too big for the screen)
- Changed timestamp handling--attempt to detect and discard
timestamps that arrive out of order
- Added option controlling title justification to
mono theme
- Filter <Scroll_Lock> modifiers as well as the other lock
modifiers (Matt Krai)
- Fixed
display-message function update background color,
and gracefully handle invalid color specifiers (Matt Krai)
- Reverted to grabbing events on the client window, not the frame,
avoids some awkward-to-fix-correctly problems
- Load i18n support before other libraries; ensures that
some static strings get translated
- Fixed annoying flicker when cycling to an iconified window
0.21.1
- Fixed problem causing spurious double-click events to be reported
in click-to-focus mode
- Fixed problem with binding -Off events in the
window-keymap. (Matt Krai)
- Don't try to grab non-existent keys (which actually grabs the
entire keyboard)
- Fixed some problems with reading unusually formatted GNOME menu
entries
0.21
- Frame pattern definitions (foreground, background, font) may now
take alists as well as the old single object, or list of four objects.
Possible states are
inactive, focused,
highlighted, clicked, inactive-highlighted,
inactive-clicked. (Last two are new)
- New program
sawmill-themer. A GUI for creating simple
themes (those without any parts defined by functions)
- New module
gnome-int, loaded by sawmill-defaults if
GNOME is around, sets up some GNOME'ish things
- New command
toggle-single-window-mode
- Translation updates/additions: de (Christoph Rauch), es (Iñaki
García Etxebarria), nl (Han-Wen Nienhuys)
- Optional removal of tooltips after time period (Morgan Schweers)
- Any-RET completes interactive move or resize
- Work around Imlib's annoying image caching,
make-image now
always returns a new image
- Fixed gc bug when building window frames
- Fixed X property handling on Alpha's (George Lebl)
- Make
call-command accept closures
- Make
(cursor . nil) work correctly in frame definitions
- Grab on frame window, not client window (ICCCM compliant)
- Fixed the "uniconify to current workspace" option
- Added window-maximization predicates to the gaol
0.20
- Rewrote workspace handling--windows can now appear on multiple
workspaces, with each instance having different properties (position,
size, whatever...)
Create new window instances by using the copy-to-next-workspace,
copy-to-previous-workspace, and copy-to-workspace:n
commands. Merge instances by moving them to the same workspace, or
using the delete-window-instance command
- Added linear-viewport commands--indexing two-dimensional virtual
workspace areas by one-dimensional values (adapted from code by Eric
Kidd)
- Rewrote tooltips; especially how they're removed (also, don't
show null keymaps)
- Added new match-window property
ungrouped. Means to put
the window in a group on its own
- Translation additions/updates: da (Wandy Christiansen), en_GB
(me), es (Iñaki García Etxebarria), fr (Christian Gillot), gl (Jesus
Bravo Alvarez)
- Fixed bug of not refocusing unshaded windows
- Fixed bug of not notifying windows of their actual position after
placing them
- Fixed bug when grabbing Hyper-modified buttons
- Fixed the focus-flickering when moving windows opaquely
- Fixed the
commandp function when applied to autoload stubs
- Fixed typo in
gnome-logout command (Jens Finke)
- Fixed
raise-window-and-pass-through-click command to pass
<click2>, etc, events through to frame parts
- Fixed infinite-regress bug when reading GNOME menu entries
(
Type=directory, but actually a file)
- Fixed bug when showing window-move position with snapped movement
(adapted from merlin@merlin.org)
- Fixed bug when matching null text properties
0.19
- Added tooltips for window frames (disabled by default)
- Added
Grab... button to match-windows dialogue, grabs
the value of an X property from a window
- Support for creating cursors from bitmaps, and for changing the
colors of cursors
- Internationalized all strings in the configurator
- New functions:
frame-part-get, server-grabbed-p,
forget-button-press, resize-window-with-hints,
window-in-workspace-p, windows-share-workspace-p
- New window properties:
never-focus, raise-on-focus
- New pseudo-property (for window matching):
size, in terms
of the window's size hints
- Message catalogue additions/updates: Galician (Jesus Bravo
Alvarez); Danish (Birger Langkjer)
- Don't ignore initial state property of windows
- Option to control height of drawn bevels (Chris Hanson)
- More logical method of drawing diagonal gradients (Chris Hanson)
- Fixed typo when looking for i18n theme README files (Jesus Bravo
Alvarez)
- Fixed
popup-apps-menu command (Gérard Milmeister)
- Fixed
define-frame-class when creating keymaps
- Fixed conversion of old-style
(set ...) custom types
- Fixed
raise-window-and-pass-through-click command to
pass-through subsequent clicks
- Fixed problems when grabbing/ungrabbing customized keymaps
- Fixed screen corruption when doing wireframe moving and
move-resize-raise-window is set
- Hacked around window-order problem when sticky windows exist
0.18
- General subsystem for matching windows to properties as they're
created. Allows matching on one or more of the window's X properties
(e.g. name, class, etc...), and then setting any number of window
manager properties as a result. See the
Matched Windows
customize group
- Removed all
auto-foo-alist and
bar-windows-re variables, they're obsoleted by the general
match-windows mechanism
- Respect window's size hints when maximizing (both to see if the
window is maximizable, and to truncate the maximized dimensions to an
integral number of rows and columns)
- Show actual colors in the configurator, not just their names
- Added a new directory to the theme search path:
prefix/share/sawmill/themes. Use this for system-wide
themes (don't use the version specific directory)
- Included a new theme
mono
- Deprecated the
show-message function, replaced by
display-message with a better calling interface; also displays
multi-line strings
- Deprecated the menu "expand variables when first in list"
behaviour. Instead expand variables when the list is dotted to them, as
is done for functions
- Support the
Hyper modifier, prefix is H-
- In the configurator, look for i18n'd theme README files (Yukihiro
Nakai)
- Added option to disable the ability to grab a second edge while
resizing (
resize-add-edges)
- Included Danish message catalogue (Kenneth Christiansen)
- Renamed
fixed-position property as sticky-viewport,
and focus-proxy-click as focus-click-through
- When evaluating mouse events, look in the window that the pointer
was in when the button was pressed, not where the pointer currently is
- Fixed bug where focus gets totally lost after closing a Motif
application that has grabbed the keyboard
- Fixed (again) the problems when handling remapped windows; also
should be more ICCCM-compliant
- Fixed typos in one-dimensional maximisation (Gérard Milmeister)
- Fixed the logic deciding when it's necessary to switch workspaces
after merging an empty one
- Fixed interactive placement showing the window when edge-flipping
(but it still doesn't work properly, rubber band traces are left)
- Removed flicker when focusing already-focused windows
0.17
0.16
0.15
- Changed how themes are loaded from tar files--the tar file must
now contain a directory with the same name as the theme; it's this
directory that stores the data files
- Allow viewport edge-flipping to be enabled by the customization
system, also enable flipping while moving windows
- Unified the method of marking which windows should be avoided
when maximizing, and which windows should be avoided when using the
fitted placement methods. Set the
avoid property instead of the
maximize-avoid property; new functions window-avoided-p
and avoided-windows; new regexp avoided-windows-re
- New command
delete-empty-workspaces
- Default theme is now
microGUI
- When resizing only one edge of a window, moving the pointer past
one of the perpendicular edges grabs that edge also
- Only the first three buttons focus a window in click-to-focus
mode
- Changed behaviour of
window-id and
window-frame-dimensions functions. Replaced
query-last-pointer function by query-button-press-pointer
- New hooks:
while-moving-hook, while-resizing-hook
- Notice when
WM_TRANSIENT_FOR property changes
- More bug fixes to the maximization code, mainly for efficiency;
also make first-fit placement work from top-left again
- Fix bug when matching events with Any modifier as well as
other modifiers
- Fix bug in
window-outside-viewport-p (Andreas Degert)
- Fix bug in
sawmill-client -- with long inputs
- Fix bug when matching windows with session
data--
SM_CLIENT_ID or WM_COMMAND has to match
- Fix bugs when passive grabbing non-button-press pointer events
0.14
- Rewrote window-maximization, many new options
- New option
resize-by-frame-class, when enabled (the
default), the resized window edges are chosen to match the class of the
clicked frame part (i.e. matching the cursor shape)
- Load GNOME support code automatically if it looks like GNOME is
being used
- Create unix-domain sockets in
/tmp
- New hooks:
window-moved-hook, window-resized-hook,
after-initialization-hook, shape-notify-hook.
- Improved how menus are displayed; the window-ops menu is shown by
ButtonPress not ButtonRelease events
- Refocus most-recently-focused window when switching viewport
- Added
centered placement style
- Added symbol-completion to readline-based client
- Fix bug of not noticing WM_NORMAL_HINTS property changes; follow
the window's maximum size hints
- Fix bug of not reframing windows when they change from unshaped
to shaped, or vice versa
0.13
- New option to only highlight frame parts when their window is
focused (
highlight-when-unfocused)
- Typing ESC while moving/resizing a window cancels the
operation, restoring the original geometry
- New session management hook
sm-after-restore-hook
- New function
set-frame-part-value--makes customizing the
frame-part-classes variables easier
- Support for loading themes from tar files; needs librep 0.7
- Fix bug when allocating colors (choosing an incorrect cached
color)
- Fix image tiling in frame part backgrounds
- Handle shifted keysyms when passive grabbing
- Fix another race condition when active grabbing
- Fix
_WIN_CLIENT_LIST property not being set properly (both
missing windows immediately after they're adopted, and of intentionally
skipping ignored windows)
- Fix some problems with viewports when exiting/restarting
- Fix broken stacking of windows after they're mapped
- Prevent smart window placement blowing up when large numbers of
windows are open/opened (throttle back to random placement when the
event queue is too large, as well as trying to prune the search space)
0.12
- Remember most recently focused windows on each workspace,
activate that window after changing workspaces; also, try to preserve
focus when moving windows between workspaces
- Option to disable auto-raise while cycling through windows
(
cycle-disable-auto-raise); option to restrict cycling to the
current viewport (cycle-all-viewports)
- Option
lock-first-workspace is now enabled by default, and
prevents both the first and last interesting workspaces being moved
inwards
- Added readline support to the client program, pass
--with-readline option to configure (from Christopher P Goller
goller@eng.utah.edu)
- Added shaped-transient frame to microGUI theme
- New frame part attribute
below-client
- Release passive grabs when unadopting windows
- When no window has the focus, the
root-window-keymap is
searched for key-press events
- Fix bug when binding to the unix-domain socket
- Fix focus sometimes being lost when the focused window is
destroyed
- Fix bug when reading GNOME menu entries without
Type
fields
- Fix bug when removing title or border of
shaped-transient
window types (make the window completely unframed)
- Fix bug when shading a transient window with
decorate-transients enabled
- Fix some bugs when placing windows that are almost as big or
bigger than the screen
- Fix some race-conditions between wm-generated and
client-generated map/unmap/reparent events
- Fix infamous "jerky pointer" bug, this will also make
overlapping shaped frame-parts display correctly
- Fix bug where
cycle-windows could leave a window
originally under the pointer that's unfocused, drawn as though it is
focused
0.11
- New option
lock-first-workspace, prevent the first
workspace from being deleted when it's empty
- New option
ignore-window-input-hint, to always give
windows the focus, whether they say they will accept it or not
- New options when cycling windows:
cycle-warp-pointer and
cycle-focus-windows
- Restore the old method of setting the focus, should fix bug of
losing focus totally when switching to a new workspace
0.10
- Implemented virtual workspaces, bind to the
move-viewport-x and move-window-x commands
(for x being left, right, up, or
down)
- Added a new theme:
microGUI by Ryan Lovett
ryan@ocf.berkeley.edu, based on the QNX Photon screenshots
- Added a
Grab key button in the bindings widget, replaces
the current binding with the next pressed key
- Lisp module to load the GNOME menus and use them to replace the
applications menu. Add
(require 'gnome-menu) to your
~/.sawmillrc file to load it
- Network server is disabled by default (since it can provide a
security hole if X access control is disabled); re-enabled the old unix
domain socket code (see the FAQ for more details)
- Only give the input focus to windows that actually want it
- New option to keep transient windows above their parents
(
transients-above-parents)
- New option to control how the workspace boundary is handled when
moving windows between workspaces (
workspace-send-boundary-mode)
- New commands
send-to-workspace:x for x from 1
to 9
- While windows are hidden or shaded, unmap the client (for ICCCM
compliance)
- Slightly different method of handling destroyed clients,
hopefully results in fewer annoying error messages
- Support X installations without X11R6 session management (by not
doing any session management)
- Don't ask the session manager to save our environment
- Fix bug where a window is destroyed/unmapped while it's being
resized or moved
- Fix bug where window can still be auto-raised even if it's been
defocused
- Fix problems when
--prefix option has a trailing slash
- Now handles client windows being reparented by a third party
(i.e. swallowing apps)
0.9
- The first-fit and best-fit algorithms are now much more
intelligent, e.g. instead of falling back to random placement when a
window can't be placed without overlapping an existing window, they
will attempt to minimize this degree of overlapping
- The
foreground property of each frame part may now be an
image instead of a piece of text
- New theme
smaker, uses the foreground images capability to
do a somewhat WindowMaker-like theme (with the absolute-e images). This
theme is extensively customizable--all images, colors, dimensions,
etc...
- Use Imlib's fuzzy color matching for all color allocation; this
should help on
PseudoColor visuals
- Added an
xterm command to launch an xterm
- Improved the bindings customization widget layout; added a
Copy button to insert a copy of the current binding
- Added
next-workspace-row and previous-workspace-row
commands. Together with the workspace-columns variable these
mimic a 2d desktop
- Removed the
cycle-through-workspaces option, there's now
workspace-boundary-mode--one of stop, wrap-around
or keep-going
- Added option to include ignored windows when edge snapping
(
move-snap-ignored-windows)
- Fix race condition between startup of sawmill and gmc; sawmill
now has earlier priority
- Fix seg fault when running out of color cells while generating a
window frame
- Fix bug where the window-workspace mapping wasn't reloaded from
saved sessions
- Fix cancel/revert problems in bindings widget
- Fix problems binding to shifted keys when using the XKEYBOARD
extension and XFree86
- Be ICCCM compliant when a client requests to be moved
- Fix crash when tiling small images into large images
- Fix bug where windows could be snapped totally off-screen
- Fix bug when windows change their
override_redirect
attribute while unmapped
- Fix bug associated with WordPerfect's menu window
0.8
- First attempt at best-fit window placement (doesn't really work
properly yet...)
- Added a customization option to focus windows when they're
un-iconified (
focus-windows-on-uniconify)
- Fix bug in click-to-focus mode where the click is only passed
through to the client window, not to any local bindings of the wm
- Don't leave windows unframed if there's an error in the user's
startup files
- Fix bug in
preallocated-workspaces option
- Don't place windows off-screen in first-fit mode
0.7
- Added stack-based window cycling, bound to M-TAB by
default. Hold <Meta>, keep pressing <TAB> until the correct
window is reached, then let go of <Meta>.
- Added first-fit window placement (a.k.a smart-placement)
- Completed first stage of workspace rewrite--shouldn't go
ballistic when windows are removed anymore
- Added
override-frame-part-classes variable--allows all
frame properties to be overridden on a per-class basis
- Click-to-focus now accepts any button and any modifiers
- Don't snap to gmc icons or panels
- Added an
auto-window-type-alist variable mapping window
names to border types
- New variables
eval-modifier-events and
eval-key-release-events to allow catching these types of
keyboard events, disabled by default
- Added functions for actively grabbing the keyboard
- Removed the long names of the keyboard modifiers, only the single
character modifiers are left
- If no alt modifier, set it to the same as meta; new variables
alt-keysyms and meta-keysyms describe the virtual
modifier assignments
- Fix bug when handling shaped frame parts--it was possible to go
into a long enter-, leave-notify loop when the old shape was cleared
- Fix bug where opaque resizing with snap-to-edges on moved the
window as well as resizing it
- Fix bug when raising the only managed window
- Fix bug where very small client windows got weirdly shaped
frames
0.6
- Define the standard classes of frame parts (i.e. things
like close button, title, left border, etc...) then allow the state of
members of these classes to be set in one place (the
frame-part-classes variable). This should ensure that different
themes have the same feel (but a feel that may be customized by the
user)
- Allow frame parts to be removed if possible (if they have the
removable property). Nothing makes use of this yet
- Added window-shading, double-click button1 on the title bar
- Created a sawmill capplet for the GNOME control center. Use the
--enable-capplet configure option to build it
- First attempt at a technical manual (very quickly written, so
probably some inaccuracies)
- In the
gtk theme, draw bevels on window decorations
- Use spin-buttons in the configurator to enter numbers
- Add option
focus-proxy-click controlling whether to pass
the focus-inducing button-press event to the underlying window (in
click-to-focus mode)
- Changed the bindings in window borders, it's now the more usual
button1 to resize, button2 to move
- When clicking and dragging windows, ensure that the clicked frame
part stays clicked until the button is released
- If in click-to-focus mode, and there's no parent window to focus
when the focused window is closed, focus the topmost window (not the
window under the pointer as in the other focus modes)
- Changing window frames is much less ugly, no flicker at
all!
- Try to optimise window restacking some more
- Sped up opaque window moving when the position display is enabled
- Preserve iconified state across restarts
- Optimise updating the shape of an unframed window (this stops gmc
icons flashing annoyingly)
- Fix bugs in click-to-focus mode where some windows were
un-focusable
- Fix bug where cycling through windows in click-to-focus mode
didn't focus the activated window
- Fix bug where comparing sawmill lisp objects caused a crash
- Fix bug where initiating a resize in the middle of the window
didn't allow any of the edges to be moved
- Fix bug where changing the "decorate transients" option didn't
alter any existing transient windows
- Fix bug where iconifying a sticky or ignored window gave no way
of reclaiming it--these windows now appear at the end of the window
menu
0.5
- Now does session management. The scheme is extensible, arbitrary
Lisp modules can save and restore window state due to their own
functionality (using the
sm-window-save-functions and
sm-restore-window-hook hooks). See lisp/workspace.jl for
an example
- Displays window position or dimensions whilst interactively
moving or resizing a window (
move-show-position,
resize-show-dimensions)
- Mechanism for setting frame styles on a per-window basis (this
was always possible, just not easy). The
auto-frame-style-alist
variable associates window name regular expressions with frame styles.
Also, the window-ops-menu has a new submenu with all possible
styles
- New option
preallocated-workspaces, the number of
workspaces to create at startup
- Window-workspace mapping is preserved through restart (as long as
the GNOME hints are enabled)
- Theme directories may contain a short
README file that
will be displayed in the configuration tool
- Changed the custom file to
~/.sawmill/custom instead of
~/.sawmill-custom. The old file will be moved to the new
location if it exists
- Install
sawmill-menu under libexec since it
shouldn't be run manually
- Option in
gradient theme to create full-sized gradient
images, trading memory for quality
- Workaround the flicker when raising windows
- Changed most of the
menus and custom customize
options into normal variables (they're not particularly intuitive)
0.4
0.3a
- Support the maximized GNOME window states
- Where available, show documentation strings of commands in the
configurator
- Improve the method of handling clicks in frame-parts
- Fix asynchronous client-server protocol
- Fix interactive window moving/resizing (don't leave traces of the
rubber-band, stop the window initially "jumping" to the pointer)
0.3
- Implemented window maximization
- Added support for snapping to window edges when interactively
moving windows (
move-snap-edges and move-snap-epsilon)
- First attempt at handling a subset of the Motif and OpenLook
window hints
- Removed the
sloppy-focus variable, it's replaced by
focus-mode. This can currently be one of enter-exit
(normal focus follows pointer), enter-only ("sloppy" focus) or
click (click to focus)
- When resolving pointer events, scan the
keymap property of
the window under the pointer, not the focused window (as with keypress
events)
- The
sawmill-client program can now communicate inter-host,
since it uses X properties not raw sockets
- New hook
before-exit-hook, called immediately before
shutting down
- Rewrote the GNOME support as a Lisp module
- Placing windows interactively now works
- Fixed the bug on Solaris where deleting windows could cause a
segmentation fault
0.2
- Added a user-customization system, inspired by Emacs' customize
facility. Invoke this through the
sawmill-ui program, or from
the Customize... entry in the main menu. All changes are stored
in the Lisp script ~/.sawmill-custom
- Selected windows may now be raised
(
raise-selected-windows)
- It's possible to prevent the mouse pointer being warped to
selected windows (
warp-to-selected-windows)
- The
brushed-metal and simple themes now define all
four standard frame types
- Frame themes are now stored in a separate directory
(
prefix/share/sawmill/version/lisp/themes) so that
the list of all available themes can be made automatically
- The frame colors of the
simple frame style can now be
customized (simple-normal-color and simple-active-color)
- The
sawmill-defaults.jl script enables GNOME compliance
unconditionally (since it has no ill-effects even if GNOME isn't being
used)
- Transient windows can be given the same frames as normal windows
(
decorate-transients)
- Newly-displayed transient windows can be automatically given the
focus if their parent window is focused (
transients-get-focus)
- Any newly-displayed windows can be automatically given the input
focus (
focus-windows-when-mapped)
- The
foreground, background and font
attributes of each frame part may now refer to a function
- Fixed the window-move bug whereby the first motion event was
discarded
- Fixed the bug where windows may be placed partially off the root
window, even if they needn't be
- Fixed the shaped frame parts bug (they didn't work)
- Miscellaneous other bug-fixes
0.1
First proper release
Node:Colors,
Next:Fonts,
Previous:News,
Up:Top
Colors
Sawfish provides a primitive type allowing colors to be represented.
Each color object allows a single color value to be named and passed
between Lisp functions.
Returns t when arg is a member of the color type.
|
Returns the color object representing the color specified by the string
name. This is according to the standard X11 color specifiers,
either a named color from the rgb.txt database, or a string
defining the red, green and blue components of the color, either eight
or sixteen bits in hexadecimal, i.e. #RRGGBB or
#RRRRGGGGBBBB.
Signals an error if no known color has the name name.
|
| get-color-rgb red green blue
|
Function |
|
Return the color object representing the color with RGB components as
specified (each component ranging from 0 to 65535).
|
Given a color object, it's possible to find both the actual rgb values
defining the color and one of the names that X11 uses to refer to the
color.
Return a list of integers (red green blue) the
actual color values of the color represented by object COLOR. The
individual values range from 0 to 65535.
|
| color-name color
|
Function |
|
Return a string defining one of the X11 names used to specify the color
represented by the color object color. Note that this may well be
different to the name used when the color was originally allocated.
|
Where a color object is used to define the foreground color of a piece
of text, the default-foreground color provides the default value
used if no actual color is specified.
| default-foreground
|
Variable |
|
The color used for text where no other color is defined.
|
Node:Fonts,
Next:Images,
Previous:Colors,
Up:Top
Fonts
As with the color type, the font type allows X11 fonts to be
manipulated by Lisp code.
Returns t if arg is a font object.
|
|
Return a font object representing the X11 font specified by the string
Signals an error if no font named name is available.
|
Several functions allow the attributes associated with a font object to
be found.
|
Returns the name of the X11 font represented by object font (a
string).
|
| font-height font
|
Function |
|
Returns the bounding height of glyphs in the font represented by object
font.
|
| text-width string &optional font
|
Function |
Returns the number of horizontal pixels that would be required to
display the text string using font object font (or the
value of the default-font variable if font is undefined).
|
As with colors, a default font may be specified, to be used where no
other font is specified.
|
Font object used when no other font has been specified.
|
Fonts can have Lisp properties associated with them (similar to the
property lists associated with symbols). Currently these aren't
actually used by the window manager.
| font-put font property value
|
Function |
|
Associate the lisp object value with the property named by the
symbol property of the font object font.
|
| font-get font property
|
Function |
Return the value of the property named by the symbol property of
the font font, or nil if no such property exists.
|
Node:Images,
Next:Cursors,
Previous:Fonts,
Up:Top
Images
The image type allows arbitrary 24-bit images to be manipulated by the
window manager. Images may be both loaded from files, and rendered
dynamically.
Returns t when arg is a member of the image type.
|
| make-image file-name
|
Function |
Creates and returns an image object containing the image defined by the
contents of the file named file-name (a string). The
image-load-path directory provides the search path used while
trying to find a directory containing the file named file-name.
All common image formats will likely be able to be loaded. But PNG,
JPEG and XPM should always be supported.
Signals an error if file called file-name may be found, or if an
image may not be constructed from the file.
|
|
A list of directory names. This defines the search path used when
loading images.
|
| make-sized-image width height &optional color
|
Function |
|
Create and return a new image, of size width, height. If
color is defined it specifies the color of all pixels in the
image. If undefined, all pixels will be black.
|
| copy-image image
|
Function |
|
Returns a newly allocated image object, an exact copy of the image
object image.
|
| image-dimensions image
|
Function |
Returns a cons-cell (width . height) defining the
dimensions of the image represented by image.
|
| flip-image-horizontally image
|
Function |
|
Flip the contents of image about the vertical axis.
|
| flip-image-vertically image
|
Function |
|
Flip the contents of image about the horizontal axis.
|
| flip-image-diagonally image
|
Function |
|
Flip the contents of image about an axis running from the
top-left corner to the bottom-right corner of the image.
|
As with many of the other types, arbitrary state may be associated with
image objects.
| image-put image property value
|
Function |
|
Set the property named property (a symbol) of image to
value.
|
| image-get image property
|
Function |
Return the property named property of image, or nil
if no such property exists.
|
The only predefined property is the symbol tiled, used when an
image is displayed in a window decoration. When set to a non-nil value
the image is not scaled to the size of the decoration (the default),
but is tiled across the decoration.
When images are scaled across border decorations the pixels that are
actually scaled are defined by the border of the image. The
border defines the outer rectangle of pixels that are left as-is, and
the inner rectangle which is scaled.
| image-border image
|
Function |
Returns a list of integers (left right top
bottom), the border of the image object image.
The number associated with each edge of the image defines the number of
pixels adjacent to that edge that will not be scaled.
|
| set-image-border image left right top bottom
|
Function |
|
Sets the border of image.
|
The shape of the image may also be specified, this defines which pixels
are treated as being transparent. Each image may define a single color
as marking transparent pixels.
| image-shape-color image
|
Function |
Return the color marking transparent pixels in image, or
nil if no such color has been specified.
|
| set-image-shape-color image color
|
Function |
|
Specify that color marks transparent pixels in image.
|
It's also possible to define color modifiers for each image.
These define the transformation applied to the value of each pixel when
it is displayed. Four different modifiers exist for each image, one for
each color component, and one for the image as a whole.
| image-modifier image type
|
Function |
Return the modifier defined by the symbol type of image, a
list of integers (gamma brightness contrast).
Each integer has a value between zero and 255 representing the weight
applied to the associated attribute when rendering the image.
The four types are red, green, blue and nil
(all colors).
|
| set-image-modifier image type gamma brightness contrast
|
Function |
|
Set the image modifier of image defined by type.
|
There are also several other functions manipulating images:
| bevel-image image border upwards &optional bevel-percent
|
Function |
|
Transform the edgemost pixels of image to give it a "bevelled"
effect. BORDER is an integer defining the width of the bevel. If
upwards is non-nil the bevel is raised, otherwise it is lowered.
If bevel-percent is defined it specifies the height or depth of
the drawn bevel. When undefined, the value of the parameter is taken
from the default-bevel-percent variable.
|
| default-bevel-percent
|
Variable |
|
Default height of drawn bevels, as a percentage.
|
| clear-image image &optional color
|
Function |
|
Set all pixels in image to color (or black if color
is undefined).
|
| tile-image dest-image source-image
|
Function |
|
Tiles source-image into dest-image, starting from the
upper-left corner, working outwards.
|
Node:Cursors,
Next:Windows,
Previous:Images,
Up:Top
Cursors
Cursors define the shape and hot-spot of the mouse pointer's image. A
lisp type is provided for manipulating these objects.
Returns t if arg is a member of the cursor type.
|
Returns the cursor object representing the cursor defined by
data. If data is a symbol, it's replaced by its
cursor-shape property.
Possible data values are an integer representing a glyph in the
standard X11 cursor font, or a four-element vector.
If a vector the format is [image mask fg
bg] where image and mask are the filenames of
standard X11 bitmaps, and fg and bg are colors (or names of
colors). All bitmap files are searched for using the
image-load-path variable.
|
| recolor-cursor cursor fg bg
|
Function |
|
Change the colors of the cursor object cursor to fg and
bg (either color objects or the names of colors).
|
| default-cursor cursor
|
Function |
|
Set the cursor object displayed in the root window, and in parts of
window frames that have no other cursor specified, to cursor.
|
So that the integer indices of glyphs in the X11 cursor font do not
have to be remembered, the cursor-shape properties of the
following symbols are automatically set:
X_cursor, arrow, based_arrow_down,
based_arrow_up, boat, bogosity,
bottom_left_corner, bottom_right_corner,
bottom_side, bottom_tee, box_spiral,
center_ptr, circle, clock, coffee_mug,
cross, cross_reverse, crosshair,
diamond_cross, dot, dotbox, double_arrow,
draft_large, draft_small, draped_box,
exchange, fleur, gobbler, gumby,
hand1, hand2, heart, icon,
iron_cross, left_ptr, left_side, left_tee,
leftbutton, ll_angle, lr_angle, man,
middlebutton, mouse, pencil, pirate,
plus, question_arrow, right_ptr,
right_side, right_tee, rightbutton,
rtl_logo, sailboat, sb_down_arrow,
sb_h_double_arrow, sb_left_arrow, sb_right_arrow,
sb_up_arrow, sb_v_double_arrow, shuttle,
sizing, spider, spraycan, star,
target, tcross, top_left_arrow,
top_left_corner, top_right_corner, top_side,
top_tee, trek, ul_angle, umbrella,
ur_angle, watch, xterm.
The glyphs associated with these names are shown in Appendix I, of
Volume Two, Xlib Reference Manual.
Node:Windows,
Next:Customization,
Previous:Cursors,
Up:Top
Windows
One of the most important data types in sawfish is the window type. All
managed client windows have a single window object associated with
them.
Returns t if arg is a member of the window type, and has a
client window associated with it.
|
|
Returns a list containing all managed window objects, in the order that
they were adopted by the window manager (first to last).
|
| get-window-by-id xid
|
Function |
Return a window object with id xid, or nil.
|
| get-window-by-name name
|
Function |
Return a window object with name name, or nil.
|
Node:Window Property Lists,
Next:Window Attributes,
Up:Windows
Window Property Lists
Many window manager extensions need to be able to associate Lisp data
with individual windows. For example, the module handling iconification
needs to associate a boolean value with each window--whether that
window is iconified or not.
To solve this problem, Sawfish gives each window a property list. These
are exactly analogous to the property lists stored with each symbol
(see Property Lists);
they allow values to be associated with Lisp symbols, for a particular
window.
Note that these properties are different to the properties that X
stores with each window, since these properties are internal to the
window manager (see X Properties).
| window-put window property value
|
Function |
|
Set the lisp property named property (a symbol) associated with
window object window to value.
|
| window-get window property
|
Function |
Return the window property named property associated with the
window object window, or nil if no such property exists.
|
For a list of the standard window properties, see Standard Properties.
Node:Window Attributes,
Next:Input Focus,
Previous:Window Property Lists,
Up:Windows
Window Attributes
| window-name window
|
Function |
|
Return the name associated with window.
|
| window-full-name window
|
Function |
|
Return the full-name associated with window. This may or may not
be the same as the normal name.
|
| window-icon-name window
|
Function |
|
Return the icon name associated with window.
|
| window-mapped-p window
|
Function |
Return t if the client window associated with object
window is mapped. (Note that this doesn't necessarily mean that
it is visible.)
|
| window-transient-p window
|
Function |
Returns nil if window isn't marked as a transient window.
Otherwise returns an integer, the xid of the parent window.
|
| window-shaped-p window
|
Function |
Return t if window is shaped (possibly not rectangular).
|
| window-id window
|
Function |
If window object window has a client window associated with,
return an integer defining its xid, otherwise return nil.
|
| window-group-id window
|
Function |
Return an integer defining the xid of the leader of the group that
window is a member of, or nil if window is not a
member of a group.
|
| window-wants-input-p window
|
Function |
Return t when the client window associated with object
window has asked for the input focus to be assigned to it when
applicable (through the input field of its WM_HINTS
property).
|
| window-dimensions window
|
Function |
Returns a cons cell (width . height) defining the
dimensions of the client window associated with object window.
|
| window-position window
|
Function |
Returns a cons-cell (x . y) defining the position
relative to the root window of window.
|
| window-size-hints window
|
Function |
Return an alist defining the size-hints structure specified by the
client window associated with window. Possible keys in the alist
are min-height, max-height, min-width,
max-width, height-inc, width-inc,
min-aspect, max-aspect, base-height,
base-width, user-position, program-position,
user-size, program-size, window-gravity.
|
| window-visibility window
|
Function |
Returns a symbol defining the current visibility of window.
Possible returned symbols are fully-obscured,
partially-obscured or unobscured.
|
Node:Input Focus,
Next:X Properties,
Previous:Window Attributes,
Up:Windows
Input Focus
The input focus defines exactly which client window will receive events
generated by the keyboard.
Returns the window object of the currently focused window, or
nil if no window is focused.
|
| set-input-focus window
|
Function |
|
Sets the focus to the client window associated with window.
|
Defines the current method of using the mouse to assign the input
focus. Possible values are enter-exit, enter-only and
click.
|
| focus-proxy-click
|
Variable |
When in click-to-focus mode, the focus-assigning click is only passed
through to the client window if this variable is non-nil.
This option may be set on a per-window basis by setting the
focus-click-through property of the window (using the
window-put function).
|
Sawfish also maintains the order in which windows were recently
focused.
| window-order &optional workspace allow-iconified all-viewports
|
Function |
|
Return a list of windows, in most-recently-focused order.
If workspace is an integer, then only windows on that workspace
are included, otherwise all workspaces are searched.
If allow-iconified is non-nil, iconified windows are included. If
all-viewports is non-nil, then all viewports of the workspace(s)
are scanned.
|
| window-order-push window
|
Function |
|
Push window object window onto the top of the focus stack.
|
| window-order-pop window
|
Function |
|
Remove window object window from the focus stack.
|
| window-order-focus-most-recent
|
Function |
|
Focus the most-recently-focused window on the current viewport of the
current workspace.
|
Node:X Properties,
Next:Window Stacking,
Previous:Input Focus,
Up:Windows
X Properties
The X window system associates properties with windows (these are
totally separate to the properties that sawfish associates with window
objects, see Window Property Lists). Most inter-client
communication is performed through manipulation of these properties.
All functions defined below, that operate on X properties, accept their
window parameter as either a window object (denoting the
associated client window), the numeric xid of a window, or the symbol
root denoting the root window.
Sawfish represents X atoms (both the names and data types of X
properties) as symbols. There is an exact correspondence between the
names of atoms and the name of the symbol representing them. For
example, the X atom STRING is represented by the lisp symbol
STRING.
| list-x-properties window
|
Function |
|
Return a list of symbols defining the X properties set on window.
|
| delete-x-property window property
|
Function |
|
Deletes the X property named property (a symbol) associated with
window.
|
| get-x-property window property
|
Function |
Returns a list (type format data) representing
the X property property of window. If no such property
exists, return nil.
type is the atom defining the type of the property. format
is an integer, either 8, 16 or 32, defining the number of bits in each
of the data items. data is an array, either a string for an 8-bit
format property, or a vector of integers otherwise.
If type is ATOM and format is 32, then data
will be a vector of symbols, representing the atoms read.
|
| set-x-property window property data type format
|
Function |
|
Set the X property property of window to the array
data, either a string or a vector of integers.
type is a symbol representing the atom defining the type of the
property; format is either 8, 16 or 32 defining the number of
bits in the data values.
If type is ATOM and format is 32, then any symbols
in data will be converted to their numeric X atoms.
|
The standard X property formats don't allow for an array of strings to
be stored, so these are often encoded as the strings concatenated,
separated by zero characters. These are usually called text
properties. Sawfish has two functions for manipulating them:
| get-x-text-property window property
|
Function |
Similar to get-x-property, but returns either nil or a
vector of strings.
|
| set-x-text-property window property data
|
Function |
|
Sets the X text property property of window to the array
of strings data.
|
It's also possible to detect when the value of any property associated
with a managed window changes, using the property-notify-hook.
See Standard Hooks.
Node:Window Stacking,
Next:Moving and Resizing Windows,
Previous:X Properties,
Up:Windows
Window Stacking
The stacking order of the display defines the order in which windows
are shown, from topmost to bottommost.
|
Return a list of window objects defining the current stacking order of
all client windows, from top-most to bottom-most.
|
| restack-windows list
|
Function |
|
Restack all client windows specified in the list of window objects
list in the order they occur in the list (from top to bottom).
The stacking order of any unspecified windows isn't affected.
|
| x-raise-window window
|
Function |
|
Raise the client window associated with object window to the top
of the display.
|
Sawfish allows the stacking order to be managed as a sequence of
layers, with windows being assigned a particular depth within the
order. For any given window with depth d, it will be above all
windows with depth less than d, and below all windows with depth
greater than d. It may be above or below any other windows with
depth d.
The depth property of each window is used to store this depth. A
depth of zero is "normal", with negative depths stacked below, and
positive depths stacked above this normal level.
| stacking-order-by-depth depth
|
Function |
Similar to stacking-order, but only returns windows with depth
depth.
|
| set-window-depth window depth
|
Function |
|
Set the stacking depth of window to depth, then restacks
the windows to reflect this change.
|
| window-on-top-p window
|
Function |
Returns t if window is at the top of its stacking depth.
|
| stack-window-below below above
|
Function |
|
Change stacking order of window below so that it is immediately
below window above.
|
| stack-window-above above below
|
Function |
|
Change stacking order of window above so that it is immediately
above window below.
|
| save-stacking-order &rest forms
|
Macro |
Evaluate forms in an implicit progn, then restore the
original window stacking order, returning the value of the
progn.
|
For the following functions, when called interactively they all operate
on the window that received the current event, or alternatively the
currently focused window.
| lower-window window
|
Command |
|
Lower window to the bottom of its stacking depth.
|
| raise-window window
|
Command |
|
Raise window to the top of its stacking depth.
|
| raise-lower-window window
|
Command |
|
If window is the highest in its stacking level, lower it to the
bottom of this level, otherwise raise it to the top of its level.
|
| lower-window-depth window
|
Command |
|
Decrement the stacking depth of window.
|
| raise-window-depth window
|
Command |
|
Increment the stacking depth of window.
|
Node:Moving and Resizing Windows,
Next:Showing and Hiding Windows,
Previous:Window Stacking,
Up:Windows
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 |
|
A combination of the previous two functions.
|
| resize-window-with-hints window cols rows &optional hints
|
Function |
Resize the window associated with object window so that it has
cols columns and rows rows. 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.
|
Node:Showing and Hiding Windows,
Next:Destroying Windows,
Previous:Moving and Resizing Windows,
Up:Windows
Showing and Hiding Windows
Sawfish provides two low-level functions for withdrawing client windows
from the display. These are used to implement both virtual workspaces
(see Workspaces) and iconification (see Iconifying Windows).
| hide-window window
|
Function |
|
Prevent object window from being displayed.
|
| show-window window
|
Function |
|
Ensure that window (if it has been mapped, and is within the
screen boundary) is visible.
|
| window-visible-p window
|
Function |
Returns t if object window has not been hidden by the
hide-window function.
|
Node:Destroying Windows,
Next:Shading Windows,
Previous:Showing and Hiding Windows,
Up:Windows
Destroying Windows
There are several methods through which X11 client windows may be
removed from the display. These differ in the level "politeness" they
show the window and its owning application.
| delete-window window
|
Command |
Delete window, i.e. send a WM_DELETE_WINDOW client-message
if possible, or just kill the associated X11 client if not.
window may be a window object or a numeric window id.
|
| delete-window-safely window
|
Command |
If the application owning window supports it, send a
WM_DELETE_WINDOW message to window. Otherwise just emit a
beep.
|
| destroy-window window
|
Command |
|
Destroy window without giving the owning application any warning.
window may be a window object or a numeric window id.
|
| x-kill-client window
|
Function |
|
Force a close down of the X11 client that created the window specified
by window (a window object, or numeric id).
|
When a managed window is destroyed, the destroy-notify-hook will
subsequently be invoked (see Standard Hooks).
Node:Shading Windows,
Next:Iconifying Windows,
Previous:Destroying Windows,
Up:Windows
Shading Windows
Many window managers allow a window to be shaded; when in this
state only the title bar of the window is visible.
| shade-window window
|
Command |
|
Arrange for only the title bar of window to be visible.
|
| unshade-window window
|
Command |
|
If the window is shaded, restore it to it's original state.
|
| toggle-window-shaded
|
Command |
|
Toggle the shaded state of the window.
|
The shaded property of a window is set to t when the
window is shaded. If a window is added with this property already set,
then the window will appear in its shaded state.
Node:Iconifying Windows,
Next:Maximizing Windows,
Previous:Shading Windows,
Up:Windows
Iconifying Windows
X defines an iconic state for windows, often windows in this state are
displayed as small icons. Sawfish does not display these icons, instead
iconified windows are shown slightly differently in the menu of all
windows.
| iconify-window window
|
Command |
|
Iconify the window associated with object window.
|
| uniconify-window window
|
Command |
|
Return the window associated with window from its iconified state.
|
A window's iconic state may be tested through examination of its
iconified property--when t the window is iconified.
Node:Maximizing Windows,
Previous:Iconifying Windows,
Up:Windows
Maximizing Windows
The dimensions of a window may be temporarily maximized.