550
815
stores with each window, since these properties are internal to the
551
816
window manager (@pxref{X Properties}).
818
For a list of the standard window properties, see @ref{Standard Properties}.
553
820
@defun window-put window property value
554
821
Set the lisp property named @var{property} (a symbol) associated with
555
window object @var{window} to @var{value}.
822
window object @var{window} to @var{value}. Note that these are Lisp
823
properties not X properties.
558
826
@defun window-get window property
559
Return the window property named @var{property} associated with the
560
window object @var{window}, or @code{nil} if no such property exists.
563
For a list of the standard window properties, see @ref{Standard
567
@node Window Attributes, Input Focus, Window Property Lists, Windows
827
Return the window property named @var{property} (a symbol) associated
828
with the window object @var{window}, or @code{nil} if no such property
829
exists. Note that these are Lisp properties not X properties.
832
@defun map-window-properties function window
833
Call @code{(@var{function} @var{property} @var{value})} on each of the
834
Lisp properties bound to @var{window}. Returns the value of the last
835
@var{function} invocation. If any @var{function} returns @code{nil},
836
@code{map-window-properties} returns @code{nil} immediately.
840
@node Window Types, Window Attributes, Window Property Lists, Windows
841
@section Window Types
843
@cindex Types, of windows
844
@cindex Windows, types of
846
Transient windows are pop-up or dialog windows associated with a main
847
application. They tend to have less window decorations, and are
848
intended to last a short time only.
850
@defun window-transient-p arg
851
Returns @code{t} if @var{arg} represents a transient window.
854
@defun mark-window-as-transient w
855
Mark that the window associated with object @var{w} is a transient
859
@defun transient-of-p child parent
860
Return true if window @var{child} is directly a transient for window
861
@var{parent}, false otherwise.
864
@defun indirect-transient-of-p descendant ancestor
865
Return true if window @var{descendant} is (directly or indirectly) a
866
transient for window @var{ancestor}, false otherwise.
869
@defun transient-parents child &optional indirectly
870
Return the list of windows that window @var{child} is a transient
871
for. If @var{indirectly} is true, then return the list of all
872
ancestors rather than parents.
875
@defun transient-children parent &optional indirectly
876
Return the list of windows that are transients for window
877
@var{parent}. If @var{indirectly} is true, then return the list of
878
all descendants rather than children.
881
@defun transient-group window &optional by-depth
882
Return the list of windows which is either a transient window for
883
window @var{window}, or a window which @var{window} is a transient
884
for. This always includes W. The `transient window for' relation holds
885
for windows which are direct or indirect transients of the parent
888
If the @var{by-depth} argument is true, then the retrurned list is in
892
@defun map-transient-group fun window
893
Map the single argument function @var{fun} over all windows in the same
894
transient group as window @var{window}.
897
@defun raise-window-and-transients window
898
Raise window @var{window} to its highest allowed position in the
899
stacking order. Also raise any transient windows that it has.
902
@defun lower-window-and-transients window
903
Lower window @var{window} to its lowest allowed position in the
904
stacking order. Also lower any transient windows that it has.
907
@defun raise-lower-window-and-transients window
908
If window @var{window} is at its highest possible position, then lower
909
it to its lowest possible position. Otherwise raise it as far as
910
allowed. Also changes the level of any transient windows it has.
913
@defvr Customizable focus-windows-when-mapped
914
Focus on application windows when they first appear. Defaults to
915
true, must be true or false.
918
@defvar decorate-transients
919
Decorate dialog windows similarly to application windows. Defaults to
923
Desktop windows are root windows or viewport windows.
925
@defun desktop-window-p arg
926
Returns @code{t} if @var{arg} represents a desktop window.
929
@defun mark-window-as-desktop w
930
Mark that the window associated with object @var{w} is a desktop
934
@defvar desktop-window-properties
935
List of properties set (to true) on windows marked as desktops.
938
'(fixed-position sticky sticky-viewport)
942
@defvar desktop-window-depth
943
The stacking depth of desktop windows. Defaults to -4.
946
Dock windows are simply those with the @code{dock-type} property.
947
GNOME panels are one example. Sawfish does not currently assign them
948
any special behavior.
950
@defun dock-window-p arg
951
Returns @code{t} if @var{arg} represents a dock window.
954
@defun mark-window-as-dock w
955
Mark that the window associated with object @var{w} is a dock
959
@defvar dock-window-properties
960
List of properties set (to true) on windows marked as docks.
963
'(window-list-skip cycle-skip fixed-position focus-click-through
964
avoid no-history never-iconify never-maximize sticky
965
sticky-viewport placed)
969
@defvar dock-window-depth
970
The stacking depth of dock windows. Defaults to 0.
973
@node Window Attributes, Input Focus, Window Types, Windows
568
974
@section Window Attributes
569
975
@cindex Window attributes
570
976
@cindex Attributes, of windows
851
For the following functions, when called interactively they all operate
852
on the window that received the current event, or alternatively the
853
currently focused window.
855
@deffn Command lower-window window
1464
@defun restack-window w
1465
Assuming that the current stacking order is in a consistent state
1466
except, possibly, for the position of window @var{w}, restore the
1467
consistent state including window @var{w}. This is achieved by raising
1468
or lowering window W as appropriate.
1471
@node Raising and Lowering Windows, , Stacking Order, Window Stacking
1472
@subsection Raising and Lowering Windows
1473
@cindex Windows, raising
1474
@cindex Windows, lowering
1476
Over time, Sawfish has accumulated several subtle variations of
1477
functions for raising and lowering windows. One set of functions
1478
operates on single windows.
1480
@deffn Function lower-window window
1481
@deffnx Command lower-single-window window
856
1482
Lower @var{window} to the bottom of its stacking depth.
859
@deffn Command raise-window window
1485
@deffn Function raise-window window
1486
@deffnx Command raise-single-window window
860
1487
Raise @var{window} to the top of its stacking depth.
863
@deffn Command raise-lower-window window
1490
@deffn Function raise-lower-window window
1491
@deffnx Command raise-lower-single-window window
864
1492
If @var{window} is the highest in its stacking level, lower it to the
865
1493
bottom of this level, otherwise raise it to the top of its level.
868
@deffn Command lower-window-depth window
1496
Notice how the function name and command name for each pair differs
1497
slightly. Another set of functions supports operating on multiple windows
1498
simultaneously. Again, the function name and command name for each
1501
@deffn Function lower-window* window
1502
@deffnx Command lower-window window
1503
Lower @var{window} and possibly associated windows to the bottom of
1504
their stacking depths.
1507
@deffn Function raise-window* window
1508
@deffnx Command raise-window window
1509
Raise @var{window} and possibly associated windows to the top of their
1513
@deffn Function raise-lower-window* window
1514
@deffnx Command raise-lower-window window
1515
If @var{window} is the highest in its stacking level, lower it and
1516
possibly associated windows to the bottom of their level, otherwise
1517
raise them to the top of their level.
1520
@defvar user-raise-type
1521
Indicates which windows the @code{lower-window*}, @code{raise-window*}
1522
and @code{raise-lower-window*} functions affect. This variable can be
1526
Only the specific argument window is affected.
1528
The specific argument window and all of its transients are affected.
1529
This is the default.
1531
The specific argument window and all windows in its group are
1536
@defun maybe-raise-window w
1537
If window @var{w} supports the @code{_SAWFISH_WM_RAISE_WINDOW}
1538
protocol, ask it whether it wants to raise itself or not. Otherwise,
1539
raise the window unconditionally.
1542
@defun maybe-lower-window w
1543
If window @var{w} supports the @code{_SAWFISH_WM_LOWER_WINDOW}
1544
protocol, ask it whether it wants to lower itself or not. Otherwise,
1545
lower the window unconditionally.
1548
Sawfish has more general operations that raising a window to the top
1549
or lowering it to the bottom. It can place a window relative to one
1550
or more other managed windows.
1552
@defun raise-windows w order
1553
@defunx lower-windows w order
1554
@defunx raise-lower-windows w order
1555
Raise (or lower) all windows in @var{order}, such that items earlier in
1556
the list are higher (or lower) than later items. The window @var{w}
1557
is special, always being the highest or lowest window, even if appears
1558
in the middle of @var{order}.
1560
For @code{raise-lower-windows}, if @var{w} would be raised or lowered,
1561
then all the other windows are also raised or lowered.
1564
There are also functions (and associated commands) to change a
1567
@deffn Function lower-window-depth window
1568
@deffnx Command lower-window-depth window
869
1569
Decrement the stacking depth of @var{window}.
872
@deffn Command raise-window-depth window
1572
@deffn Function raise-window-depth window
1573
@deffnx Command raise-window-depth window
873
1574
Increment the stacking depth of @var{window}.
1577
Sawfish provides special support for ``click-to-focus'' mode, where
1578
you may or may not want to raise the window or pass the click to the
1579
underlying application.
1581
@defun raise-and-pass-through-click w
1582
Raise the window that received the current event with
1583
@code{maybe-raise-window}. Then replay any pointer events that
1584
invoked the command.
1587
@defun raise-and-pass-through-click-if-focused w
1588
Raise the window that received the current event (if it's focused)
1589
with @code{maybe-raise-window}. Then replay any pointer events that
1590
invoked the command.
1593
@defun raise-or-pass-through-click w
1594
If the window that received the current event is not on top, raise it
1595
with @code{maybe-raise-window}. Otherwise replay any pointer events
1596
that invoked the command, sending them to the window.
1599
When the above commands are called interactively, Sawfish will try to
1600
invoke them on the window that received the current event. Failing
1601
that, Sawfish will invoke them on the currently focused window.
877
1603
@node Moving and Resizing Windows, Showing and Hiding Windows, Window Stacking, Windows
878
1604
@section Moving and Resizing Windows
1074
1824
Return the window associated with @var{window} from its iconified state.
1827
@deffn Command toggle-window-iconified window
1828
Minimize the window associated with @var{window}, or restore it if it
1829
is already minimized.
1832
@deffn Command iconify-workspace-windows
1833
Minimize all windows in the current workspace.
1077
1836
A window's iconic state may be tested through examination of its
1078
1837
@code{iconified} property---when @code{t} the window is iconified.
1081
@node Maximizing Windows, , Iconifying Windows, Windows
1838
But it is preferable to use explicit testing functions instead:
1840
@defun window-iconified-p window
1841
Returns true if the window associated with @var{window} is iconified,
1845
@defun window-iconifiable-p window
1846
Returns true if the window associated with @var{window} can be
1847
iconified, false otherwise. Some reasons a window might not be
1848
iconifiable are: it has a @code{never-iconify} property; it is
1849
already iconified; it is not a desktop window; or it is marked
1850
@code{ignored} and @code{iconify-ignored} is not true.
1853
@defvar iconify-ignored nil
1854
Unmanaged (@code{ignored}) windows may be iconified. Defaults to nil.
1857
Sawfish allows you to control certain behaviors when restoring
1860
@defvar focus-windows-on-uniconify
1861
Windows are focused after being unminimized. Defaults to false.
1864
@defvar raise-windows-on-uniconify
1865
Windows are raised after being unminimized. Defaults to true.
1868
@defvar uniconify-to-current-workspace
1869
Move windows to the current workspace when they are unminimized.
1873
When iconifying, it is possible to force other windows to iconify.
1875
@defvr Customizable iconify-group-mode
1876
@defvrx Customizable uniconify-group-mode
1877
Policy for performing chains of minimizations or restorations. When a
1878
particular window is minimized or restored, it can cause other windows
1879
to be minimized or restored at the same time. Their allowed values
1880
are set to the following list. By default, both variables are bound
1881
to the symbol @code{transients}. but they are not required to have the
1887
No additional windows are minimized or restored.
1889
All transient windows associated with the target window are minimized
1892
All windows in the target window's group are minimized or restored.
1895
Finally, it's possible to get the icon that would normally be
1896
displayed for an iconified window.
1898
@defun window-icon-image window
1899
Return an image object representing the icon currently associated with
1900
@var{window}, or @code{nil} if there is no such image.
1903
@node Window Stickiness, Ignored Windows, Iconifying Windows, Windows
1904
@section Window Stickiness
1905
@cindex Window stickiness
1906
@cindex Sticky, windows
1908
Windows normally exist in a single workspace and a single viewport
1909
into that workspace. When changing workspace or viewport, the current
1910
windows disappear. This is sometimes not the correct policy; there
1911
are certain windows that should ``follow'' the user from window to
1912
window. These are typically windows that are not bound to a
1913
particular activity. The most common example is a dashboard window
1914
for calling other applications. Another example might be a diagnostic
1915
program such as a load monitory.
1917
Each window has ``stickiness'' flags that govern this behavior. One
1918
flag controls stickiness across workspaces: sticky windows will appear
1919
in every workspace automatically. The other flag similarly governs
1920
stickiness across viewports. A window is ``sticky'' if either of
1921
these flags are set.
1923
Sticky windows are often @code{ignored}, so they lack window
1924
decorations, and @code{avoid}ed so other windows do not cover them up.
1926
@defun window-sticky-p/workspace window
1927
@defunx window-sticky-p/viewport window
1928
@defunx window-sticky-p window
1929
Returns true if @var{window} is sticky across a particular environment
1930
(workspaces, viewports, or either), false otherwise.
1933
@defun make-window-sticky/workspace window
1934
@defunx make-window-sticky/viewport window
1935
@defunx make-window-sticky window
1936
Make the @var{window} sticky across some environment (workspaces,
1937
viewports, or both).
1940
@defun make-window-unsticky/workspace window
1941
@defunx make-window-unsticky/viewport window
1942
@defunx make-window-unsticky window
1943
Make the @var{window} unsticky across some environment (workspaces,
1947
@defun toggle-window-sticky window
1948
If @code{window-sticky-p} would report true for @var{window}, make
1949
@var{window} unsticky for all environments. Otherwise make it sticky
1950
for all environments.
1953
@node Ignored Windows, Maximizing Windows, Window Stickiness, Windows
1954
@section Ignored Windows
1955
@cindex Windows, ignored
1957
Sawfish has a general concept of ``ignored'' windows; the user does
1958
not interact normally with those windows. The concept is actually
1959
defined by five different window properties:
1963
The window does not receive frames.
1966
The window never receives the input focus.
1969
The window is ignored while window cycling.
1971
@item window-list-skip
1972
The window will not be included in the window list.
1974
@item task-list-skip
1975
The window will not be included in the task list.
1979
A monitor application such as ``xload'' might have all five of these
1982
Rather than directly manipulating the window properties, it is better
1983
to use the following access functions:
1985
@defun window-ignored-p window
1986
Returns true if the window has the @code{ignored} property, false
1990
@deffn Command make-window-ignored window
1991
Ignore the window @var{window}.
1994
@deffn Command make-window-not-ignored window
1995
Unignore the window @var{window}.
1998
@deffn Command toggle-window-ignored window
1999
If @code{window-ignored-p} would return true for @var{window}, make it
2000
unignored. Otherwise make it ignored.
2003
The remaining flags only have toggle functions implemented right now:
2005
@deffn Command toggle-window-never-focus window
2006
@deffnx Command toggle-window-cycle-skip window
2007
@deffnx Command toggle-window-list-skip window
2008
@deffnx Command toggle-task-list-skip window
2009
Toggle the appropriate flag on @var{window}.
2012
All five of the flags are available through the window menu's
2015
@node Maximizing Windows, Animating Windows, Ignored Windows, Windows
1082
2016
@section Maximizing Windows
1083
2017
@cindex Maximizing windows
1084
2018
@cindex Windows, maximizing
1086
The dimensions of a window may be temporarily @dfn{maximized}.
2020
The dimensions of a window may be temporarily @dfn{maximized},
2021
stretching as far as possible across the screen in one or two
1088
2024
@deffn Command maximize-window window &optional direction
1089
2025
Maximize both dimensions of @var{window}
1137
2073
Return @code{t} when @var{window} is horizontally maximized.
2076
@node Animating Windows, Cycling Between Windows, Maximizing Windows, Windows
2077
@section Animating Windows
2078
@cindex Windows, Animating
2080
Sawfish provides certain window animation capabilities. They have
2081
been described as ``lame'', so they are off by default.
2083
@defvar default-window-animator
2084
The default window animation mode, used if a window has no explicit
2085
animation set. Normally @code{none}.
2088
@defun define-window-animator name fun
2089
Define a window animator called @var{name} (a symbol) that is managed
2090
by function @var{fun}. @var{fun} is called as @samp{(fun window op
2091
[action])} when it should change the state of an animation sequence.
2092
@var{Op} may be one of the symbols @code{start}, @code{stop}.
2095
@defun autoload-window-animator name struct
2096
Construct an autoloader for window animator @var{name} from structure
2100
@defun run-window-animator window action
2101
Invoke an animation for action @var{action} on @var{window}.
2102
@var{Action} may be one of the symbols @code{start}, @code{stop}.
2105
@defun record-window-animator window animator
2106
Note that @var{window} currently has an animation running, being
2107
controlled by animator function @var{animator}.
2110
@node Cycling Between Windows, Window Groups, Animating Windows, Windows
2111
@section Cycling Between Windows
2112
@cindex Windows, cycling between
2114
Sawfish provides two categories of commands for cycling between
2115
windows. The first category cycles between windows in an order that
2116
is essentially fixed. The second category cycles between windows in a
2120
* Fixed Window Cycles::
2121
* Dynamic Window Cycles::
2124
@node Fixed Window Cycles, Dynamic Window Cycles, Cycling Between Windows, Cycling Between Windows
2125
@subsection Fixed Window Cycles
2126
@cindex Window cycles, fixed
2128
These commands organize the set of mangaged windows into loops. A
2129
loop may consist of all windows in a workspace, or it may consist of
2130
all windows anywhere. The positions of windows in this loop do not
2131
change, except when a new window is managed or unmanaged.
2133
@defun next-workspace-window
2134
@defunx previous-workspace-window
2135
Switch focus to the ``next'' or ``previous'' window in the current
2140
@defunx previous-window
2141
Switch focus to the ``next'' or ``previous'' window in this
2142
workspace. If this function reaches the ``end'' of the windows in
2143
this workspace, it switches to the next workspace and displays the
2147
@node Dynamic Window Cycles, , Fixed Window Cycles, Cycling Between Windows
2148
@subsection Dynamic Window Cycles
2149
@cindex Window cycles, dynamic
2151
These commands implement something much close to Microsoft Windows'
2152
@key{Alt-TAB} mechanism, working with a stack of recently used
2155
@defun cycle-windows
2156
@defunx cycle-windows-backwards
2157
Cycle through all cycleable windows.
2161
@defunx cycle-group-backwards
2162
Cycle through all windows in this group.
2164
This is somewhat comparable to the @key{Control-TAB} behavior of
2169
@defunx cycle-prefix-backwards
2170
Cycle through all windows whose titles match that of the initial
2171
window (up to, but not including, the first colon).
2175
@defunx cycle-class-backwards
2176
Cycle through all windows whose classes match that of the initial
2181
@defunx cycle-dock-backwards
2182
Cycle through all windows in the dock, even those with the
2183
@code{cycle-skip} property.
2186
Each of these cycling commands may include windows that are not
2189
@defvar cycle-include-iconified
2190
If true, Sawfish includes iconified windows when cycling. Defaults to
2194
@defvar cycle-all-workspaces
2195
If true, Sawfish includes windows on all workspaces when cycling.
2199
@c FIXME: viewports aren't documented right now
2200
@c @defvar cycle-all-viewports
2201
@c If true, Sawfish includes windows on all viewports when cycling.
2202
@c Defaults to false.
2205
It is possible to configure the cycling to get more feedback during
2208
@defvar cycle-show-window-names
2209
If true, Sawfish displays window names and icons while cycling through
2210
windows. Defaults to true.
2213
@defvar cycle-raise-windows t
2214
If true, Sawfish raises windows while they're temporarily selected
2215
during cycling. Defaults to true.
2218
It is also possible for you to define your own stacking cycle
2219
commands, or even to alter the window stack to suit your tastes.
2221
@defun define-cycle-command name body &rest rest
2222
Create a command that will not cause the current cycle operation
2223
to abort before execution.
2225
All arguments are passed to define-command.
2228
@defun define-cycle-command-pair forward-name reverse-name selector &rest rest
2229
Create a pair of commands for cycling through windows. The command named
2230
@var{forward-name} cycles forwards, while the command named
2231
@var{reverse-name} cycles backwards.
2233
@var{Selector} is called when initializing the cycle environment, it
2234
should return the list of windows to cycle through, or the symbol `t'
2235
to denote all cyclable windows.
2237
Any extra arguments are passed to each call to define-command.
2240
@defun window-order &optional workspace allow-iconified all-viewports
2241
Return managed windows in most-recently used order.
2243
If @var{workspace} is non-nil, then only managed windows in that
2244
workspace will be returned.
2246
If @var{allow-iconified} is non-nil, then iconified windows will be
2247
returned instead of ignored.
2249
If @var{all-viewports} is non-nil, then windows in all viewports will
2250
be returned, instead of just the current viewport.
2253
@defun window-order-push w
2254
Push window @var{w} onto the top of the cycle stack.
2257
@defun window-order-pop w
2258
Remove window @var{w} from the cycle stack.
2261
@defun window-order-most-recent &key windows
2262
Return the most-recently focused window in the current workspace. If
2263
the @var{windows} argument is given it should be a list of windows, in
2264
this case the function will restrict its search to the elements of
2268
@defun window-order-focus-most-recent
2269
Switch input focus to the most-recently focused window in the current
2273
@node Window Groups, , Cycling Between Windows, Windows
2274
@section Window Groups
2275
@cindex Groups, windows
2277
Sawfish provides extra tools and commands for dealing with ICCCM
2278
groups. Most ``normal'' groups work the same way as they do in the
2279
ICCCM standard: windows have a group property that is set to the X
2280
window ID of the group leader. These are ``group IDs'', and they are
2281
always positive integers. In addition, Sawfish allows group IDs to
2285
@item negative integers
2286
These are anonymous user-defined groups.
2288
These are named user-defined groups. Named user-defined groups are
2289
saved as part of window properties when saving sessions.
2292
@defun window-group-ids
2293
Return the list of all group ids.
2296
There may be certain named groups that always exist, whether or not
2297
any window belongs to them.
2299
@defvar peristent-group-ids
2300
A list of symbols naming groups that always exist.
2303
In any case, a window is limited to belonging to one group, and always
2304
belongs to one group.
2307
* Assigning Windows to Groups::
2308
* Operations on Groups::
2311
@node Assigning Windows to Groups, Operations on Groups, Window Groups, Window Groups
2312
@subsection Assigning Windows to Groups
2313
@cindex Groups, assigning windows to
2315
It is possible to change the group of a window in Sawfish. Use
2316
@code{add-window-to-group}, or if necessary you can set the window's
2317
@code{group} property explicitly.
2319
@defun add-window-to-group window group-id
2320
Place @var{window} in group @var{group-id}, replacing any previous
2321
group membership. If @var{group-id} is @code{nil}, then Sawfish
2322
returns the window to whatever group membership was supplied by ICCCM.
2325
@defun add-window-to-new-group window
2326
Place @var{window} into a new group, which will have @var{window} as
2327
its sole member. This is an anonymous user-defined group. The new
2328
group ID is returned.
2331
The Sawfish group assignment never overrides the ICCCM group
2332
assignment, just suppresses it. The @code{window-actual-group-id}
2333
function implements this overriding.
2335
@defun window-actual-group-id window
2336
Return the (Sawfish) group ID for @var{window}. This is, in order of
2339
@item The group ID assigned by Sawfish
2340
@item The group ID passed in by ICCCM.
2341
@item The corresponding values for an owning window, if the given window is transient.
2342
@item The window's own window ID.
2345
This means that a window is, at the very least, part of its own group.
2348
Each of the following functions operates on the ``actual group ID'' as
2349
returned by the above function.
2351
@defun windows-by-group group-id &optional by-depth
2352
Return the list of windows in the group with id @var{group-id}.
2353
If @var{by-depth} is non-nil, then return the windows in order of
2354
stacking, from topmost to bottommost.
2357
@defun windows-in-group w &optional by-depth
2358
Return the list of windows in the same group as window @var{w}.
2359
If @var{by-depth} is non-nil, then return the windows in order of
2360
stacking, from topmost to bottommost.
2363
@defun map-window-group fun w
2364
Map the single argument function @var{fun} over all windows in the
2365
same group as window @var{w}. Note that @var{fun} needs to operate
2366
using side-effects, rather than returning values.
2369
@defun map-other-window-groups fun w
2370
Map the single argument function @var{fun} over all windows not in the
2371
same group as window @var{w}. Note that @var{fun} needs to operate
2372
using side-effects, rather than returning values.
2375
@defun window-group-menu &optional w
2376
Return a menu definition suitable for @code{popup-menu}. This menu
2377
will allow the user to assign the window @var{w} into any group of a
2378
managed window, or into a brand new group. The window's current group
2379
is checked or otherwise marked.
2382
@node Operations on Groups, , Assigning Windows to Groups, Window Groups
2383
@subsection Operations on Groups
2384
@cindex Groups, operations on
2386
Most of the window manipulation functions that operate on windows are
2387
also available for window groups. Each of these functions takes a
2388
window as argument; the affected group is that window's group.
2390
@defun iconify-group w
2391
@defunx uniconify-group w
2392
@defunx iconify-transient-group w
2393
@defunx uniconify-transient-group w
2394
These operate like their single-window counterparts. They work by
2395
temporarily rebinding @code{iconify-group-mode} and
2396
@code{uniconify-group-mode}.
2399
@defun make-group-sticky w
2400
@defunx make-group-unsticky w
2401
These operate like their single-window counterparts.
2404
@defun toggle-group-sticky w
2405
If window @var{w} is sticky, all windows in its group have their
2406
stickyness removed. Otherwise all windows in its group become sticky.
2409
@defun send-group-to-workspace w workspace
2410
@defunx send-group-to-next-workspace w count
2411
@defunx send-group-to-previous-workspace w count
2412
These operate like their single-window counterparts.
2415
@defun send-group-to-current-workspace w
2416
All windows in the group of @var{w} are moved from their existing
2417
workspaces to the nearest workspace that @var{w} is in. Sticky
2418
windows are not affected. If the window had the input focus and it is
2419
visible after the move, it retains the input focus.
2422
@c FIXME: viewports are deprecated, so this is commented out
2423
@c @defun move-group-to-current-viewport w
2424
@c @defunx move-group-viewport w
2427
@defun move-group-left w
2428
@defunx move-group-right w
2429
@defunx move-group-up w
2430
@defunx move-group-down w
2431
These operate like their single-window counterparts.
2434
@defun raise-group w
2435
@defunx lower-group w
2436
@defunx raise-lower-group w
2437
@defunx raise-group-depth w
2438
@defunx lower-group-depth w
2439
These operate like their single-window counterparts.
2442
@defun set-group-frame-style w style
2443
This operates like its single-window counterpart.
1141
2446
@node Customization, Window Frames, Windows, Top
1142
2447
@chapter Customization
1873
3463
However, not all frame styles will support this (it depends on the
1874
3464
frame part's @code{removable} property, @ref{Frame Part Definition}).
3466
@defun add-frame-class window class
3467
Enable all frame parts that are a member of @var{class} in
3471
@defun frame-class-removed-p window class
3472
Returns @code{t} if the frame part @var{class} has been removed from
3473
@var{window}, @code{nil} otherwise.
1876
3476
@defun remove-frame-class window class
1877
3477
Disable all frame parts that are a member of @var{class} in
1878
3478
@var{window} where possible.
1881
@defun add-frame-class window class
1882
Enable all frame parts that are a member of @var{class} in
1887
@node Workspaces, Popup Menus, Window Frames, Top
3481
@c @node Viewports, Workspaces, Window Frames, Top
3482
@c @chapter Viewports
3483
@c @cindex Viewports
3485
@c It is sometimes useful to have a logical display that is larger than
3486
@c the computer screen. This is most often implemented by displaying
3487
@c only a portion of the logical display at any time. Sawfish does this
3488
@c using ``viewports''.
3490
@c When viewports are enabled, the Sawfish logical display becomes
3491
@c infinitely large in the two directions ``across'' and ``down'' (to the
3492
@c maximum representable size of integers). Sawfish divides this logical
3493
@c display into a potentially infinite grid of cells. Each cell of the
3494
@c grid is the same size of the virtual display.
3496
@c @defvar viewport-dimensions
3497
@c The current number of viewports across and down the virtual display.
3498
@c This is a cons cell @code{(@var{across} . @var{down})}. Defaults to
3502
@c @defun set-number-of-viewports width height
3503
@c Change @code{viewport-dimensions} to have the value
3504
@c @code{(@var{width} . @var{height})}.
3507
@c The user then tells Sawfish to move the physical display from cell to
3508
@c cell. On a cell change, windows in previous cells are removed, and
3509
@c windows in the current cell appear. Windows that span two or more
3510
@c cells will appear in each cell, appropriately displaced.
3512
@c Note that cell indices start at zero in each dimension. Indices are
3515
@c @defun screen-viewport
3516
@c Returns the currently displayed viewport as a pair @code{(@var{x},
3520
@c @defun set-screen-viewport col row
3521
@c Change the physical display to view cell @code{(@var{col},
3525
@c @defun move-viewport right down
3526
@c Move the viewport to see the cell @var{right} slots to the right and
3527
@c @var{down} slots down. Either argument may be zero or negative.
3530
@c @defun set-window-viewport window col row
3531
@c Move @var{window} to the cell at @code{(@var{col}, @var{row})}. The
3532
@c relative position of the window within the cells is preserved.
3535
@c @defun move-window-viewport window col-delta row-delta
3536
@c Move @var{window} to the cell @var{col-delta} positions across and
3537
@c @var{row-delta} positions down from its current cell. The relative
3538
@c position of the window with its cells its preserved.
3541
@c @defun move-viewport-to-window window
3542
@c Move the viewport to a cell that shows window @var{window}. For a
3543
@c window that spans multiple cells, this function will pick the cell
3544
@c showing the window's top-left corner.
3547
@c @defun move-window-to-current-viewport window
3548
@c Move @var{window} from its existing viewport to the current viewport.
3549
@c The window's relative position in the existing viewport is preserved
3553
@c @defun window-viewport window
3554
@c Returns a cons cell @code{(@var{col} . @var{row})} of the viewport
3555
@c holding the top-left corner of @var{window}.
3558
@c @defun window-outside-viewport-p window
3559
@c @defunx window-outside-workspace-p window
3560
@c Returns true if @var{window} is completely outside the current
3561
@c viewport in any direction. The @code{window-outside-workspace-p}
3562
@c function is an obsolete alias for the first function; the
3563
@c ``workspace'' term is now used for another concept
3564
@c (@pxref{Workspaces}).
3567
@c @defun window-absolute-position window
3568
@c Returns a cons cell @code{(@var{x} . @var{y})} of the position of
3569
@c @var{window} in its containing viewport. The containing viewport may
3570
@c or may not be the current viewport.
3573
@c @defun set-viewport x y
3574
@c Change the position of the physical display, such that location
3575
@c @code{(@var{x}, @var{y})} is at the top-left of the display. The
3576
@c physical display may be showing more than one cell at this point.
3577
@c All windows are redisplayed as appropriate.
3580
@c @defvar uniconify-to-current-viewport
3581
@c When true, windows uniconify to the current viewport, rather than to
3582
@c the viewport they were iconified on. Defaults to true.
3585
@node Workspaces, Multi-Head Environments, Window Frames, Top
1888
3586
@chapter Workspaces
1889
3587
@cindex Workspaces
1890
3588
@cindex Desktop workspaces
1892
XXX what do I want to say here?
1895
@node Popup Menus, Events, Workspaces, Top
3590
Workspaces provide another way for users to organize their windows in
3591
Sawfish. Instead of stretching the screen real estate to the right
3592
and down, workplaces stack screens on top of each other. The user
3593
drills down into the stack, or pops up through the stack, seeing the
3594
appropriate windows in each workspace.
3597
* Workspace Intervals:: ``Interesting'' workspaces
3598
* Workspace Manipulation:: Creating, rearranging, deleting
3599
* Workspaces and Windows:: Adding, removing
3600
* Edge Flipping:: Moving workspaces using the mouse
3603
@node Workspace Intervals, Workspace Manipulation, Workspaces, Workspaces
3604
@section Workspace Intervals
3606
While the stack of workspaces conceptually goes from negative infinity
3607
to positive infinity, we normally present only the first non-empty
3608
workspace through the last non-empty workspace to the user. The
3609
non-empty interval is occasionally re-normalized to start with zero.
3611
We typically refer to workplaces with lower IDs being to the ``left''
3612
of workplaces with higher IDs, as if on a number line.
3614
@defvar current-workspace
3615
The ID of the currently active workspace. This is an integer. The
3616
``default'' workspace has ID 0.
3619
@defun workspace-limits
3620
Returns a pair @code{(@var{first-index} . @var{last-index})} defining
3621
the subset of the workspace continuum that is ``interesting'' to the
3622
user (typically, all those that have ever been explicitly created).
3625
@defun workspace-id-to-logical space-id &optional limits
3626
Takes an absolute workspace ID and returns its position in the
3627
interval of ``interesting'' workspaces. If @var{limits} is provided,
3628
it must be a pair @code{(@var{first-index} . @var{last-index})} like
3629
that returned by @code{workspace-limits}. If it is not provided, the
3630
function uses the result of @code{workspace-limits} directly.
3633
@defun workspace-id-from-logical offset &optional limits
3634
Takes an offset position into an interval of ``interesting''
3635
workspaces, and returns the workplace ID at that position. If
3636
@var{limits} is provided, it must be a pair @code{(@var{first-index}
3637
. @var{last-index})} like that returned by @code{workspace-limits}.
3638
If it is not provided, the function uses the result of
3639
@code{workspace-limits} directly.
3642
@defun popup-workspace-list
3643
Display the menu containing the list of all workspaces.
3646
@defun workspace-menu
3647
Returns a list of workspaces, suitable for display in a menu.
3650
@defvr Customizable workspace-names
3651
A list of workspace names. When displaying the workspace menu, the
3652
first @var{N} workspaces use the corresponding list elements as their
3653
display names (where @var{N} is the length of the list). Normally
3654
they get the display name @samp{space N} for some value of N.
3657
@node Workspace Manipulation, Workspaces and Windows, Workspace Intervals, Workspaces
3658
@section Workspace Manipulation
3660
Sawfish has various functions to create, rearrage and delete
3661
workspaces. Windows in a deleted workspace are not lost; they are
3662
moved to another workspace.
3664
@defun select-workspace space &key dont-focus force
3665
Activate workspace @var{space}, making it current.
3667
By default in @code{enter} and @code{click} focus modes, the most
3668
recently used window will receive focus. The caller can disable this
3669
behavior by passing a true @var{dont-focus} keyword argument.
3671
If the @var{force} keyword argument is true, we will go through the
3672
activation process even if @var{space} already is current.
3675
@defun select-workspace-from-first count
3676
Select the workspace in position @var{count} from the list of
3677
``interesting'' workspaces.
3680
@defun select-workspace-and-viewport space col row
3681
Select workspace @var{space} and then switch to viewport
3682
@code{(@var{col}, @var{row})} in that workspace.
3685
@defun insert-workspace &optional before
3686
Insert a new workspace, returning its index. The new index appears
3687
before the workspace indicated by @var{before}, or the current
3688
workspace if @var{before} is @code{nil}.
3691
@defun insert-workspace-after
3692
Create a new workspace following the current workspace.
3695
@defun insert-workspace-before
3696
Create a new workspace preceeding the current workspace.
3699
@defun move-workspace space count
3700
Move the workspace @var{space} @var{count} positions forward, or
3701
@var{count} positions backwards if @var{count} is negative.
3704
@defun move-workspace-forwards &optional count
3705
Move the current workspace one place to the right (or @var{count}
3706
places to the right if @var{count} is defined).
3709
@defun move-workspace-backwards &optional count
3710
Move the current workspace one place to the left (or @var{count}
3711
places to the left if @var{count} is defined).
3714
@defun next-workspace count
3715
@defunx previous-workspace count
3716
Switch from the current workspace (index @var{i}) to the workspace
3717
@var{i}+@var{count}. The @code{previous-workspace} function is
3718
identical to @code{(next-workspace (- @var{count}))}.
3720
These functions do not have default values for their @var{count}
3724
@defun remove-workspace &optional index
3725
Remove workspace @var{index} (or the current workspace if @var{index}
3726
is @code{nil}). All windows in that workspace are moved to the next
3727
workspace @var{index}+1. This will change the set of ``interesting''
3731
@defun merge-next-workspace
3732
Delete the current workspace. Its member windows are relocated to the
3736
@defun merge-previous-workspace
3737
Delete the current workspace. Its member windows are relocated to the
3741
@defun set-number-of-workspaces wanted
3742
Add or remove workspaces until the number of ``interesting''
3743
workspaces is equal to @var{wanted}.
3745
When adding workplaces, the new workplaces get indices higher than any
3746
existing indices. When removing workplaces, the lowest workplaces are
3747
always chosen for removal (their windows are merged into the new
3748
lowest-index workspace).
3751
@defvar lock-first-workspace
3752
When true, preserve the outermost empty workspaces in the pager.
3753
Don't quietly remove them when they become empty. Defaults to true.
3756
@node Workspaces and Windows, Edge Flipping, Workspace Manipulation, Workspaces
3757
@section Workspaces and Windows
3759
Workspaces do not need to have windows assigned to them, but most
3760
operations with workspaces involve adding and removing windows.
3762
@defun all-workspaces
3763
Returns a list of indices for all workspaces that contain windows.
3764
Sticky windows appear in the current workspace.
3767
@defun workspace-empty-p space
3768
Returns true if workspace @var{space} contains zero (non-sticky)
3772
@defun delete-empty-workspaces
3773
Delete any workspaces that don't contain any windows.
3776
@defvar workspace-boundary-mode
3777
How to act when passing the first or last workspace, one of @code{stop},
3778
@code{wrap-around} or @code{keep-going}. Defaults to @code{stop}.
3781
Each window can be a member of any (positive) number of workspaces;
3782
their @code{workspaces} property contains a list of workspace ids.
3783
Sticky windows appear on all workspaces, and have their @code{sticky}
3784
property set (with a null @code{workspaces} property). If Sawfish
3785
begins managing a window with its @code{workspaces} property set, then
3786
the window is added to those workspaces automatically.
3788
@defun window-in-workspace-p window space
3789
Returns true if @var{window} is a member of workspace @var{space},
3793
@defun window-appears-in-workspace-p window space
3794
Returns true if @var{window} appears in workspace @var{space}, false
3795
otherwise. To appear, @var{window} has to be visible, but it can
3796
either be assigned to the workspace or be sticky.
3799
@defun windows-share-workspace-p window1 window2
3800
Returns true if @var{window1} and @var{window2} are members of at
3801
least one common workspace.
3804
@defun nearest-workspace-with-window window space
3805
Returns the nearest workspace to @var{space} that contains
3809
@defun workspace-windows &optional space include-iconified
3810
Returns a list of all windows that are members of the current
3811
workspace (or @var{space} if it is not @code{nil}). The list normally
3812
does not contain iconified windows, but they can by included by
3813
specifying a true @var{include-iconified} argument.
3816
@defun popup-window-menu
3817
Display the menu of all managed windows.
3820
@defun move-window-to-workspace window old new &optional was-focused
3821
Move @var{window} from workspace @var{old} to workspace @var{new}.
3823
We need the old workspace as an explicit argument because a window can
3824
be in more than one workspace. The function does the right thing if
3825
the window already appears in workspace @var{new}.
3827
If @var{was-focused} is true and the window is visible, it gets the
3828
input focus in the new workspace.
3831
@defun copy-window-to-workspace window old new &optional was-focused
3832
Arrange it so @var{window} appears in both @var{old} and @var{new}
3835
If @var{was-focused} is true and the window is visible, it gets the
3836
input focus in the new workspace.
3839
@defun send-to-next-workspace window count &optional copy select
3840
Move the window @var{count} workspaces to the right. @var{Count} does
3843
The window is normally removed from the current workspace (if it is in
3844
that workspace), or from the first workspace it belongs to. Supplying
3845
a true @var{copy} argument causes Sawfish to copy the window instead.
3847
If @var{select} is true, then we switch to the destination workspace.
3848
If the moved window had input focus before the move, it will have
3849
input focus after the move as well.
3852
@defun send-to-previous-workspace window count &optional copy select
3853
Move the window @var{count} workspaces to the left. @var{Count} does
3856
The window is normally removed from the current workspace (if it is in
3857
that workspace), or from the first workspace it belongs to. Supplying
3858
a true @var{copy} argument causes Sawfish to copy the window instead.
3860
If @var{select} is true, then we switch to the destination workspace.
3861
If the moved window had input focus before the move, it will have
3862
input focus after the move as well.
3864
This is identical to @code{(send-to-next-workspace window count copy select)}.
3867
@defun copy-to-next-workspace window count select
3868
Copy the window @var{count} workspaces to the left. @var{Count} does
3871
If @var{select} is true, then we switch to the destination workspace.
3872
If the moved window had input focus before the move, it will have
3873
input focus after the move as well.
3875
This is identical to @code{(send-to-next-workspace window count t select)}.
3878
@defun copy-to-previous-workspace window count &optional select
3879
Copy the window @var{count} workspaces to the right. @var{Count} does
3882
If @var{select} is true, then we switch to the destination workspace.
3883
If the moved window had input focus before the move, it will have
3884
input focus after the move as well.
3886
This is identical to @code{(send-to-previous-workspace window count t select)}.
3889
@defun send-window-to-workspace-from-first window count &optional copy select
3890
Move @var{window} to the workspace at position @var{count} in the
3891
``interesting'' list.
3893
The window is normally removed from the current workspace (if it is in
3894
that workspace), or from the first workspace it belongs to. Supplying
3895
a true @var{copy} argument causes Sawfish to copy the window instead.
3897
If @var{select} is true, then we switch to the destination workspace.
3898
If the moved window had input focus before the move, it will have
3899
input focus after the move as well.
3902
@defvar workspace-send-boundary-mode
3903
How to act when passing the first or last workspace, while moving a
3904
window. One of @code{stop}, @code{keep-going}, @code{wrap-around}.
3905
Defaults to @code{stop}.
3908
@defun delete-window-instance window
3909
Remove the copy of @var{window} on the current workspace. If this is
3910
the last instance remaining, then delete the actual window. Note that
3911
this behavior differs from the merging that happens when you delete a
3915
@defun map-window-workspaces fun window
3916
Map function @var{fun} over all workspaces containing @var{window}.
3919
When a window appears on more than one workspace, some of its
3920
properties may be swapped in and out on demand when the current
3921
workspace is changed.
3923
@defvar workspace-local-properties
3924
Window properties whose values may differ on differnet workspaces.
3925
Defaults to the empty list.
3928
@defvar add-swapped-properties props
3929
Add all properties in the list @var{props} to
3930
@var{workspace-local-properties}.
3933
It is possible to hide all ``normal'' windows across workspaces.
3934
``Normal'' in this case excludes desktop windows and dock windows, but
3935
includes sticky and ignored windows. The hidden windows are no longer
3936
considered ``viewable'' according to @code{window-viewable-p}.
3939
Hide all windows except the desktop and dock windows.
3943
Undo the effects of the @code{show-desktop} command.
3946
@defun showing-desktop-p
3947
Return true if non-desktop and non-dock windows are hidden, false
3951
@node Edge Flipping, , Workspaces and Windows, Workspaces
3952
@section Edge Flipping
3954
Sawfish provides a way to flip between workspaces (or viewports)
3955
automatically by moving the mouse to the edge of the screen. The
3956
technique is called ``edge flipping''.
3958
These definitions are stored in the @code{sawfish.wm.ext.edge-flip}
3959
structure. They can only be enabled through the customization
3962
@defvr Customizable edge-flip-enabled nil
3963
When true, select the next desktop when the pointer hits screen edge.
3967
@defvr Customizable edge-flip-type
3968
Indicates what is selected when hitting the screen edge. Must be one
3969
of @code{viewport} or @code{workspace}. Defaults to @code{workspace}.
3972
@defvr Customizable edge-flip-only-when-moving
3973
When true, Sawfish only flips when the user is interactively moving a
3974
window. Defaults to false.
3977
This variable is not customizable, but it can be edited.
3979
@defvar edge-flip-delay
3980
Milliseconds to delay before edge flipping. Defaults to 250.
3983
Flippers are implemented as invisible windows on the edges of the
3984
display (the windows overlap at the corners). When the pointer moves
3985
over any of these windows, Sawfish generates @code{enter-flipper-hook}
3986
and @code{leave-flipper-hook} events.
3988
Programmers can add their own callbacks to perform other actions with
3989
the flippers. This depends on manually enabling the flippers, using
3990
the following functions in the @code{sawfish.wm.util.flippers}
3991
structure. Note that you may have to manually remove the
3992
@code{edge-flip-enter} and @code{edge-flip-leave} callbacks from the
3993
hooks before adding your own callbacks.
3995
@defun enable-flippers
3996
Add edge windows used to implement flipping.
3999
@defun disable-flippers
4000
Remove the edge windows used to implement flipping.
4003
@node Multi-Head Environments, Window Placement, Workspaces, Top
4004
@chapter Multi-Head Environments
4005
@cindex Multi-head environments
4006
@cindex Environments, multi-head
4007
@cindex Monitors, multiple
4009
Sawfish has special functions to support environments with multiple
4010
monitors displaying a single logical screen (as provided by Xinerama).
4012
@defun find-head x y
4013
Return a ID for the display head that point (@var{x}, @var{y}) is in.
4014
The return value is an integer; the default head has ID zero. Returns
4015
@code{nil} if it cannot determine the head from @var{x} and @var{y}.
4019
Return the number of display heads on the machine.
4022
@defun head-dimensions id
4023
Return the cons cell @code{(@var{width} . @var{height})} of the
4024
dimensions of the display head indicated by @var{id}. @var{Id} must
4025
be a non-negative integer. Without Xinerama support, @var{id} must be
4026
zero and the function returns the screen size.
4029
@defun head-offset id
4030
Return the cons cell @code{(@var{x} . @var{y})} of the
4031
dimensions of the display head indicated by @var{id}. @var{Id} must
4032
be a non-negative integer. Without Xinerama support, @var{id} must be
4033
zero and the function returns @code{(0 . 0)}.
4037
Return the ID of the head containing the mouse pointer.
4040
@defun current-head &optional window
4041
Return the ID of the head containing the window with input focus. If
4042
@var{window} is supplied and a window, return the head containing that
4043
window. If @var{window} is supplied and @var{nil}, return
4044
@code{(pointer-head)}.
4047
@defun current-head-dimensions &optional window
4048
Return a cons-cell defining the size in pixels of the current head
4049
(that containing the window @var{window}, or the pointer if
4050
@var{window} is false). Returns the screen dimensions if no such head
4054
@defun current-head-offset &optional window
4055
Return a cons-cell defining the origin of the current head (that
4056
containing the window @var{window}, or the pointer if @var{window} is
4057
false). Returns @code{'(0 . 0)} if no such head can be identified.
4061
@node Window Placement, Popup Menus, Multi-Head Environments, Top
4062
@chapter Window Placement
4063
@cindex Placement of windows
4065
Sawfish supports multiple ways of placing new windows on the display.
4066
There is a ``current'' placement mode for normal windows, and another
4067
mode for transient windows.
4069
@defvar place-window-mode
4070
A symbol indicating the method of placing normal windows. This
4071
defaults to @code{top-left}.
4074
@defvar place-transient-mode
4075
A symbol indicating the method of placing transient windows. This
4076
defaults to @code{centered-on-parent}.
4079
@defun placement-mode name
4080
Return the placement mode object corresponding to @var{name}.
4083
@defvar placement-modes
4084
List of names of all placement modes. Sawfish 1.3 ships with the
4085
following placement modes:
4088
@item @code{randomly}
4089
The new window is placed at a random location on the screen.
4091
@item @code{interactively}
4092
Prompt the user to select a position with the mouse. The new window
4093
is created such that its top-left corner is at that position.
4095
@item @code{centered}
4096
The new window is created at the center of the screen.
4098
@item @code{centered-on-parent}
4099
The new window has a parent, it is centered on that parent. If the
4100
new window instead has a focused window in the same group, it is
4101
centered on that focused window. Otherwise the new window is simply
4104
@item @code{under-pointer}
4105
Create the new window so that it's under the pointer, without going
4106
off the edge of the screen.
4108
@item @code{first-fit}
4109
@item @code{best-fit}
4110
Look for positions where the new window would have a small overlap
4111
area with already visible windows. The @code{first-fit} algorithm
4112
uses the first ``good'' position found. The @code{best-fit} algorithm
4113
looks at all possible positions and picks the best of them.
4115
@item @code{best-fit-group}
4116
As @code{best-fit}, but the new window is only checked for overlap
4117
with other windows in its group.
4119
@item @code{first-fit-or-interactive}
4120
As @code{first-fit}, but if Sawfish cannot find a ``good'' position,
4121
it falls back to @code{interactively} mode.
4123
@item @code{stagger}
4124
Attempts to place each new window below and to the right of the
4125
previous window. See @code{stagger-placement-step}.
4127
@item @code{top-left}
4128
Interpret the top-left to bottom-right screen diagonal as a series of
4129
slots, each of which may have a window. Find the first empty slot and
4130
place the window there. @emph{Sawfish will shrink the window to
4131
prevent it from going past the right or bottom edge, or even beneath a
4132
special window like a panel.} If Sawfish is not allowed to shrink the
4133
window enough to prevent this, it instead places the window randomly.
4135
@item @code{off-center}
4136
Tries to put windows in the center of the screen, but in such a way
4137
that the newly placed window doesn't fully obscure an existing
4140
This is to handle the case where two windows of the same size are
4141
created one after the other, so that the user is sure to see (at least
4142
part of) both windows.
4146
Make no changes to the window's position. The window remains wherever
4147
the X server placed it initially.
4151
In all of these placement modes, the mode is responsible for taking
4152
the window object as an argument, and manipulating its position with,
4153
e.g., @code{move-window-to}.
4155
@defvar stagger-placement-step
4156
In @code{stagger} placement mode, the distance down and to the right
4157
from the previously placed window to the new one. This is measured
4161
There are two circumstances in which Sawfish will place a window:
4162
either the window has just been created, or Sawfish has begun managing
4163
the window's display. In the latter case, the window will have the
4164
@code{placed} property.
4166
@defvar ignore-program-positions
4167
When @code{t}, program position size hints are not considered when
4171
``Avoided'' windows should be kept unobscured by other windows
4172
wherever possible. In particular, first-fit and best-fit methods will
4173
attempt to place new windows away from them, and maximized windows
4174
will not stretch over them.
4176
@defun window-avoided-p window
4177
Return t if @var{window} should be kept unobscured by other windows
4181
@defun avoided-windows &optional window
4182
Returns a list of all windows that should be left unobscured where
4183
possible. If @var{window} is defined, then it defines a window that
4184
will be never returned in the list.
4187
@defvar dont-avoid-ignored
4188
When non-nil, ignored windows aren't avoided by default. Defaults to
4192
@defvar avoid-by-default
4193
When non-nil, any unspecified windows are avoided by default.
4197
You can define your own placement modes.
4199
@defun define-placement-mode name fun &keywords for-normal for-dialogs
4200
Define a new window placement mode called @var{name} (a symbol). The
4201
function @var{fun} will be called with a single argument when a window
4202
should be placed using this mode. The single argument is the window
4205
If the @var{for-normal} keyword is @code{t}, then this placement mode
4206
is marked as valid for @code{place-window-mode}. The same applies to
4207
@var{for-dialogs} and @code{place-transient-mode}.
4210
@defun autoload-placement-mode name module-name &keywords for-normal for-dialogs
4211
Define placement mode @var{name} (a symbol) to be loaded from
4212
structure @var{structure-name} (a symbol) when first referenced. The
4213
@var{keyword-args} are passed along to the call to
4214
@code{define-placement-mode} that creates the placement mode.
4217
@node Popup Menus, Events, Window Placement, Top
1896
4218
@chapter Popup Menus
1897
4219
@cindex Popup menus
1898
4220
@cindex Menus, popup
2107
The keysyms generating the two virtual modifiers may be identified
2108
through the following variables:
4428
@node Event Modifiers, Event Actions, Event Representation, Events
4429
@section Event Modifiers
4430
@cindex Event Modifiers
4431
@cindex Modifiers, for events
4433
Sawfish event modifiers are copied directly from the standard X
4436
The standard X modifier names are provided, as well as four special
4437
modifiers @key{Meta}, @key{Alt} @key{Hyper} and @key{Super} that are
4438
mapped to the keysyms of the same name.
4440
The following table lists the possible modifier prefixes:
4445
The control modifier
4465
The super modifier; note that this is a lowercase @kbd{s}
4468
The standard X modifiers, for @var{k} between 1 and 5
4471
A special modifier that matches any set of modifiers in events.
4472
@xref{Event Matching}.
4475
A special modifier that matches key release events, not the default
4476
key press events. Mouse events never have @key{Release} modifiers;
4477
they have separate actions instead. @xref{Event Actions}.
4480
The @var{k}'th mouse button is currently pressed.
4483
A placeholder ``window manager'' modifier that can be bound to a real
4484
modifier on the fly. See @code{wm-modifier} below.
4487
The default Sawfish bindings use the @key{Meta} modifier. For
4488
convenience, if no X keysym generates @key{Meta}, Sawfish will treat
4489
the first defined modifier of @key{Alt}, @key{Hyper} and @key{Super}
4490
(in that order) as @key{Meta}. The mapping from keysyms to
4491
modifiers is exposed in the following variables:
2110
4493
@defvar meta-keysyms
2111
4494
A list defining the names of the X keysyms generating the virtual
4495
@samp{Meta} or @samp{M} modifier.
2115
4498
@defvar alt-keysyms
2116
4499
A list defining the names of the X keysyms generating the virtual
4500
@samp{Alt} or @samp{A} modifier.
2120
4503
@defvar hyper-keysyms
2121
4504
A list defining the names of the X keysyms generating the virtual
4505
@samp{Hyper} or @samp{H} modifier.
4508
@defvar super-keysyms
4509
A list defining the names of the X keysyms generating the virtual
4510
@samp{Super} modifier.
4513
There are two functions to manipulate the placeholder ``window
4514
manager'' (@key{W}) modifier. Unfortunately, these are low-level
4515
functions that operate on integer encodings.
4518
Return the current value (an integer) of the placeholder ``window
4519
manager'' (@key{W}) modifier.
4522
@defvr {Customizable} wm-modifier-value
4523
An integer encoding zero or more modifier keys that form the
4524
placeholder ``window manager'' (@key{W}) modifier. Setting this value
4525
through the customization UI automatically calls
4526
@code{set-wm-modifier}.
4529
@defun set-wm-modifier modifiers
4530
Set the value of the placeholder ``window manager'' (@key{W}) modifier
4531
to @var{modifiers} (an integer).
4534
@node Event Actions, Event Matching, Event Modifiers, Events
4535
@section Event Actions
4537
Sawfish recognizes keyboard actions and mouse actions.
4542
Keys pressed on the keyboard generate one or more key press events,
4543
followed by a key release event. Bindings normally recognize key
4544
press events only. To recognize key releases, add a @key{Release}
4545
modifier to the bound event.
4548
Generally keys have the same names as their X keysyms. The following
4549
unusual names are worth listing: @samp{SPC}, @samp{TAB}, @samp{RET},
4550
@samp{ESC}, @samp{BS}, @samp{DEL}, @samp{Up}, @samp{Down},
4551
@samp{Left}, @samp{Right}.
4553
For example, pressing the @key{Delete} key while @key{Control} is held
4554
down generates a @kbd{Control-DEL} event, while releasing the @key{a}
4555
key while @key{Hyper} is held down generates a @kbd{H-Release-a}
4560
Button presses generate @key{Click} actions. If Sawfish receives
4561
several clicks in close succession (less than @code{multi-click-delay}
4562
milliseconds between clicks), the second and third events are
4563
@key{Click2} and @key{Click3}, respectively. Any further clicks are
4564
simple @key{Click} events. For consistency, @key{Click1} is a synonym
4567
@item Button Releases
4568
Once the button has been released from a @key{ClickN} action, Sawfish
4569
receives a corresponding @key{OffN} action. The actions @key{Off} and
4570
@key{Off1} are synonyms.
4572
@item Pointer Motion
4573
Pointer motion generates @key{Move} actions. The action does not
4574
indicate anything about the pointer position; use e.g.,
4575
@code{query-last-pointer} to find that information.
4579
For example, a single click of the left mouse button with the
4580
@key{Meta} key held would be described as @kbd{M-Button1-Click1}.
4581
After triple-clicking with the @key{Alt} key held down, Sawfish will
4582
receive a @kbd{Alt-Off3} event.
4585
@defvar multi-click-delay
4586
An integer indicating the maximum number of milliseconds between
4587
successive clicks. Defaults to 250 milliseconds at startup; if
4588
@code{nil}, Sawfish uses 250 milliseconds.
4592
@node Event Matching, Synthetic Events, Event Actions, Events
4593
@section Event Matching
4594
@cindex Event Matching
4595
@cindex Matching, Events
4597
There is a special function that matches event objects. If the
4598
actions of two event objects are not identical, the events do not
4599
match. If they are identical, then the events match if the modifiers
4600
are identical, or if one of the modifiers is @key{Any}.
4601
@xref{Event Modifiers}.
4603
@defun event-match ev1 ev2
4604
Returns @code{t} if events @var{ev1} and @var{ev2} match, @code{nil}
4608
@node Synthetic Events, , Event Matching, Events
4609
@section Synthetic Events
4610
@cindex Synthetic Events
4611
@cindex Events, Synthetic
4612
@cindex Events, Synthesizing
4614
It is possible to create an event inside Sawfish that mimics a real
4615
keyboard or mouse event.
4617
@defun synthesize-event event window &optional propagate
4618
Generate a synthetic key press or button press and send it to the X
4619
window bound to the @var{window} object. This press is automatically
4620
followed by the appropriate release event.
4622
The current pointer position becomes the position of the event.
4624
@var{Event} is either an event object, or the string representation of
4625
an event (such as @code{"A-f"} or @code{"C-M-Button3-Click2"}).
4626
Strings are parsed into event objects before any work is done.
4627
@xref{Event Representation}.
4629
If @var{propagate} is true, the event will propagate up the window
4630
ancestor chain until it is handled.
2126
4634
@node Commands, Keymaps, Events, Top
2693
5553
the hook is called with arguments @code{(@var{window} . @var{args})}.
2696
The following table describes all standard hooks called by Sawfish, and
2697
the arguments they are called with:
2700
@item pre-command-hook
5556
The available hooks are listed below.
5561
* Window Construction Hooks::
5562
* Window Destruction Hooks::
5563
* Window Mapping Hooks::
5564
* Window Motion Hooks::
5566
* Pointer Motion Hooks::
5568
* Startup and Shutdown Hooks::
5573
@node Command Hooks, Key Hooks, Standard Hooks, Standard Hooks
5574
@section Command Hooks
5575
@cindex Command Hooks
5576
@cindex Hooks, Command
5578
@defvr {Hook} pre-command-hook
2701
5579
Called before each command is evaluated.
2703
@item post-command-hook
5582
@defvr {Hook} post-command-hook
2704
5583
Called after each command is evaluated.
2706
@item unbound-key-hook
2707
Called when an key or pointer event has been received which there is no
2710
@item before-add-window-hook
2711
@itemx add-window-hook
2712
Called with a single window when the window is first adopted by the
2713
window manager. @code{before-add-window-hook} is called first, it
2714
should only set properties of the window.
2716
@item destroy-notify-hook
2717
Called when the window is destroyed. Note that this may be called
2718
asynchronously to the normal event loop. In general, the window manager
2719
will attempt to call this hook as soon after it knows the window has
2720
been destroyed as is possible.
2722
@item map-notify-hook
2723
@itemx unmap-notify-hook
2724
@itemx reparent-notify-hook
2725
@itemx enter-notify-hook
2726
@itemx leave-notify-hook
2727
@itemx focus-in-hook
2728
@itemx focus-out-hook
2729
@itemx shape-notify-hook
2730
Called with a single window argument, analogous to the X events of the
2733
@item configure-request-hook
2734
Called with two arguments @code{(@var{window} @var{alist})} when an X
2735
@code{ConfigureRequest} event is received. @var{alist} may include
2736
items @code{(stack . above)}, @code{(stack . below)}, @code{(position .
2737
@var{coordinates})}, @code{(dimensions . @var{dimensions})}.
2739
@item enter-frame-part-hook
2740
@itemx leave-frame-part-hook
2741
Called with two arguments, the window and the frame part class
2742
(@pxref{Frame Part Classes}), when the pointer enters or leaves a frame
2745
@item window-moved-hook
2746
@itemx window-resized-hook
2747
Called with a single window argument whenever the window is moved or
2750
@item visibility-notify-hook
2751
Called with two arguments, the window, and a symbol, one of:
2752
@code{fully-obscured}, @code{partially-obscured}, @code{unobscured}.
2754
@item property-notify-hook
2755
Called with arguments @code{(@var{window} @var{atom-name} @var{type})}
2756
where @var{type} is @code{new-value} or @code{deleted}.
2758
@item client-message-hook
2759
An @code{or} type hook. Called with arguments @code{(@var{window}
2760
@var{type} @var{data-array})}.
2762
@item enter-workspace-hook
2763
@itemx leave-workspace-hook
2764
@itemx workspace-state-change-hook
2765
Called with a single argument: the workspace.
2767
@item add-to-workspace-hook
2768
@itemx remove-from-workspace-hook
2769
Called with a single argument: the window.
2771
@item viewport-resized-hook
5587
@node Key Hooks, Window Construction Hooks, Command Hooks, Standard Hooks
5592
@defvr {Hook} unbound-key-hook
5593
Called when an key or pointer event has been received which there is
5594
no binding for. The hook functions return no arguments. This is an
5595
@code{or}-type hookk---the first function that returns non-@code{nil}
5596
will terminate the hook call.
5598
Under normal circumstances, an unbound key release causes a
5599
@code{throw} to top-level. Adding @emph{any} function to this hook
5600
suppresses that behavior.
5604
@node Window Construction Hooks, Window Destruction Hooks, Key Hooks, Standard Hooks
5605
@section Window Construction Hooks
5606
@cindex Window Construction Hooks
5607
@cindex Hooks, Window Construction
5609
@defvr {Window Hook} before-add-window-hook
5610
@defvrx {Window Hook} add-window-hook
5611
Called when the window is first adopted by the window manager. This
5612
occurs before the window is created, installed or placed. At this
5613
early stage, the only safe action is to set properties of the window
5614
(with @code{window-set}).
5616
@code{add-window-hook} is a deprecated hook, replaced by
5617
@code{before-add-window-hook}. It is called immediately after
5618
@code{before-add-window-hook}.
5621
@defvr {Window Hook} after-add-window-hook
5622
Called when the window is first adopted by the window manager. This
5623
occurs after the window has been created, installed and placed.
5626
@defvr {Window Hook} after-framing-hook
5627
Called after a window gets a frame assigned, or after a window's
5632
@node Window Destruction Hooks, Window Mapping Hooks, Window Construction Hooks, Standard Hooks
5633
@section Window Destruction Hooks
5634
@cindex Window Destruction Hooks
5635
@cindex Hooks, Window Destruction
5637
@defvr {Window Hook} destroy-notify-hook
5638
Called when the window is destroyed. Note that this may be called
5639
asynchronously to the normal event loop. In general, once the window
5640
manager knows the window has been destroyed, it will attempt to call
5641
this hook as soon as possible.
5645
@node Window Mapping Hooks, Window Motion Hooks, Window Destruction Hooks, Standard Hooks
5646
@section Window Mapping Hooks
5647
@cindex Window Mapping Hooks
5648
@cindex Hooks, Window Mapping
5650
@defvr {Window Hook} map-notify-hook
5651
@defvrx {Window Hook} unmap-notify-hook
5652
@defvrx {Window Hook} reparent-notify-hook
5653
@defvrx {Window Hook} shape-notify-hook
5654
Called with a window is mapped, unmapped, reparented, or has its shape
5655
changed, respectively.
5657
Note that iconifying and uniconifying windows triggers unmapping and
5658
mapping, respectively.
5661
@defvr {Window Hook} iconify-window-hook
5662
@defvrx {Window Hook} uniconify-window-hook
5663
@defvrx {Window Hook} shade-window-hook
5664
@defvrx {Window Hook} unshade-window-hook
5665
@defvrx {Window Hook} window-maximized-hook
5666
@defvrx {Window Hook} window-unmaximized-hook
5667
@defvrx {Window Hook} window-depth-change-hook
5668
Called when a window is iconified, uniconified, shaded, unshaded,
5669
maximized, unmaximized, or has its depth changed, respectively.
5672
@defvr {Window Hook} visibility-notify-hook
5673
Called when a window's visibility changes. In addition to the window,
5674
the hook is called one one of the symbols @code{fully-obscured},
5675
@code{partially-obscured}, or @code{unobscured}.
5678
@defvr {Window Hook} place-window-hook
5679
An @code{or}-type hook. Called the first time a window is mapped, or
5680
if the window does not have a true @code{placed} property. This is an
5681
@code{or}-type hook---the first function that returns non-@code{nil}
5682
will terminate the hook call.
5686
@node Window Motion Hooks, X Hooks, Window Mapping Hooks, Standard Hooks
5687
@section Window Motion Hooks
5688
@cindex Window Motion Hooks
5689
@cindex Hooks, Window Motion
5691
@defvr {Window Hook} window-moved-hook
5692
@defvrx Window {Hook} window-resized-hook
5693
Called whenever the window is moved or resized.
5695
This hook is called inside the @code{move-window-to} and
5696
@code{move-resize-window-to} functions, so any operation that moves
5697
the window will trigger this hook. The window motion does not have to
5700
Note that outline window sizing and movement does not use
5701
@code{move-window-to} or @code{move-resize-window-to}, except at the
5702
very end of the operation.
5704
Compare with @code{while-moving-hook} and @code{while-resizing-hook}.
5707
@defvr {Window Hook} before-move-hook
5708
@defvrx {Window Hook} before-resize-hook
5709
Called before starting an interactive move or resize.
5712
@defvr {Window Hook} while-moving-hook
5713
@defvrx {Window Hook} while-resizing-hook
5714
Called during every pointer motion event during a move or resize.
5715
This includes outline window motion. The calls take place before the
5716
window or its outline are actually moved.
5718
Compare with @code{window-moved-hook} and @code{window-resized-hook}.
5721
@defvr {Window Hook} after-move-hook
5722
@defvrx {Window Hook} after-resize-hook
5723
Called after completion of an interactive move or resize. In addition
5724
to the window, the hook is called with a list of symbols indicating how
5725
the window was moved or resized:
5726
@code{horizontal} and @code{vertical} for movement,
5727
@code{right}, @code{left}, @code{bottom} and @code{top} for resizing.
5731
@defvr {Hook} after-restacking-hook
5732
Called after any window restacking operation, including (but possibly
5733
not limited to @code{restack-windows}, @code{x-raise-window} and
5734
@code{x-lower-window}. The hook functions take no arguments.
5738
@node X Hooks, Pointer Motion Hooks, Window Motion Hooks, Standard Hooks
5743
@defvr {Window Hook} configure-request-hook
5745
@code{ConfigureRequest} event is received.
5746
In addition to the window, the hook is called with an association list
5747
of configure request properties. This alist may contain items
5748
@code{(stack . above)}, @code{(stack . below)},
5749
@code{(position . @var{coordinates})},
5750
and @code{(dimensions . @var{dimensions})}.
5753
@defvr {Window Hook} property-notify-hook
5754
Called whenever an X window property (not a Sawfish window property)
5755
changes. In addition to the window, the hook is called with the
5756
atom name and one of the symbols @code{new-value} or @code{deleted}.
5759
@defvr {Window Hook} window-state-change-hook
5760
Called whenver certain window manager hints change for a window.
5761
Currently only @code{urgency} is monitored. The hint is an additional
5762
argument to the hook.
5766
@node Pointer Motion Hooks, Workspace Hooks, X Hooks, Standard Hooks
5767
@section Pointer Motion Hooks
5768
@cindex Pointer Motion Hooks
5769
@cindex Hooks, Pointer Motion
5771
In the hooks below, @var{focus-mode} is one of the symbols
5772
@code{normal}, @code{grab} or @code{ungrab}.
5774
@defvr {Window Hook} enter-notify-hook
5775
@defvrx {Window Hook} enter-frame-part-hook
5776
Called when the pointer enters a window (including the root window).
5778
If the window was part of a frame, then @code{enter-frame-part-hook}
5779
is called with three arguments: the window, the frame part class
5780
(@pxref{Frame Part Classes}), and @var{focus-mode}.
5782
Otherwise @code{enter-notify-hook} is called with two arguments: the
5783
window and @var{focus-mode}.
5785
The root window is considered to be a valid window for this hook.
5786
Sawfish will report entering the root window.
5789
@defvr {Window Hook} leave-notify-hook
5790
@defvrx {Window Hook} leave-frame-part-hook
5791
Called when the pointer leaves a window (including the root window).
5793
If the window was part of a frame, then @code{leave-frame-part-hook}
5794
is called with three arguments: the window, the frame part class
5795
(@pxref{Frame Part Classes}), and @var{focus-mode}.
5797
Otherwise @code{leave-notify-hook} is called with two arguments: the
5798
window and @var{focus-mode}.
5800
The root window is considered to be a valid window for this hook.
5801
Sawfish will report leaving the root window.
5804
@defvr {Window Hook} focus-in-hook
5805
Called when focus gains focus. The hook functions take two arguments:
5806
the window that received focus, and @var{focus-mode}.
5808
If your @var{focus-mode} is set to @code{enter-exit}, your window
5809
focus is tightly bound to your pointer position; focus-related hooks
5810
and enter/leave hooks will be called in lockstep. For other values of
5811
@code{focus-mode}, Sawfish will trigger fewer focus-related hook calls
5812
than enter/leave hook calls.
5814
This hook is never called for the root window, because the root window
5818
@defvr {Window Hook} focus-out-hook
5819
Called when a window loses focus. The hook functions take two
5820
arguments: the window that lost focus, and @var{focus-mode}.
5822
If your @var{focus-mode} is set to @code{enter-exit}, your window
5823
focus is tightly bound to your pointer position; focus-related hooks
5824
and enter/leave hooks will be called in lockstep. For other values of
5825
@code{focus-mode}, Sawfish will trigger fewer focus-related hook calls
5826
than enter/leave hook calls.
5828
This hook is never called for the root window, because the root window
5833
@node Workspace Hooks, Startup and Shutdown Hooks, Pointer Motion Hooks, Standard Hooks
5834
@section Workspace Hooks
5835
@cindex Workspace Hooks
5836
@cindex Hooks, Workspace
5838
@defvr {Hook} enter-workspace-hook
5839
@defvrx {Hook} leave-workspace-hook
5840
Called when switching from one workspace to another. This includes
5841
switching caused by adding or removing a workspace. The hook is
5842
called with a @emph{list} containing the workspace in question.
5845
@defvr {Window Hook} add-to-workspace-hook
5846
@defvrx {Window Hook} remove-from-workspace-hook
5847
Called when a window is added or removed from a workspace. In
5848
addition to the window, the hook is called with a @emph{list}
5849
containing the workspace being changed. If the window is in multiple
5850
workspaces, then removing triggers @code{remove-from-workspace-hook}
5854
@defvr {Hook} workspace-state-change-hook
5855
Called when any aspect of the workspaces change, including adding a
5856
workspace, removing a workspace, moving a workspace, inserting or
5857
removing a window from a workspace, etc. This hook is called with no
5858
arguments, so you should use one of the more specific hooks if
5862
@defvr {Hook} viewport-resized-hook
2772
5863
Called when the number of rows and columns in each virtual workspace is
2775
@item viewport-moved-hook
5867
@defvr {Hook} viewport-moved-hook
2776
5868
Called when the origin of the viewport into the virtual workspace is
2779
@item place-window-hook
2780
An @code{or} type hook. Called the first a window is mapped.
2782
@item window-state-change-hook
2783
@itemx iconify-window-hook
2784
@itemx uniconify-window-hook
2785
@itemx shade-window-hook
2786
@itemx unshade-window-hook
2787
@itemx window-maximized-hook
2788
@itemx window-unmaximized-hook
2789
@itemx window-depth-change-hook
2790
Called with a single window.
2792
@item after-initialization-hook
5872
@defvr {Hook} enter-flipper-hook
5873
@defvrx {Hook} leave-flipper-hook
5874
When viewport edge-flipping is enabled, these hooks are called as the
5875
pointer enters and leaves the pixel-wide border on the edge of the
5876
screen. They're called with a single argument, one of the symbols
5877
@code{left}, @code{right}, @code{top}, @code{bottom} indicating the
5882
@node Startup and Shutdown Hooks, Other Hooks, Workspace Hooks, Standard Hooks
5883
@section Startup and Shutdown Hooks
5884
@cindex Startup and Shutdown Hooks
5885
@cindex Hooks, Startup and Shutdown
5887
@defvr {Hook} after-initialization-hook
2793
5888
Called after adopting the initial set of windows.
2795
@item before-exit-hook
5891
@defvr {Window Hook} remove-window-hook
5892
Called on each window as Sawfish shuts down (possibly for a restart).
5893
The hook functions take no arguments.
5896
@defvr {Hook} before-exit-hook
2796
5897
Called immediately before exiting.
2798
@item sm-window-save-functions
2799
@itemx sm-restore-window-hook
2800
@itemx sm-after-restore-hook
5900
@defvr {Hook} sm-window-save-functions
5901
@defvrx {Hook} sm-restore-window-hook
5902
@defvrx {Hook} sm-after-restore-hook
2801
5903
Session management hooks, @ref{Session Management}.
2803
@item before-move-hook
2804
@itemx before-resize-hook
2805
Called before starting an interactive move or resize, with a single
2806
argument: the window.
2808
@item while-moving-hook
2809
@itemx while-resizing-hook
2810
Called while interactively moving or resizing the window passed as the
2811
argument to the hook.
2813
@item after-move-hook
2814
@itemx after-resize-hook
2815
Called after completion of an interactive move or resize. Called with
2816
two arguments: the window, and a list of symbols defining how the
2817
window was moved or resized.
2819
@item gtkrc-changed-hook
5907
@node Other Hooks, , Startup and Shutdown Hooks, Standard Hooks
5908
@section Other Hooks
5910
@cindex Hooks, Other
5912
@defvr {Hook} gtkrc-changed-hook
2820
5913
When using the @code{gtkrc} module to load the current gtk style
2821
5914
parameters, this hook is called when the style changes.
2823
@item enter-flipper-hook
2824
@itemx leave-flipper-hook
2825
When viewport edge-flipping is enabled, these hooks are called as the
2826
pointer enters and leaves the pixel-wide border on the edge of the
2827
screen. They're called with a single argument, one of the symbols
2828
@code{left}, @code{right}, @code{top}, @code{bottom} defining the edge
5917
@defvr {Window Hook} client-message-hook
5918
Called with arguments @code{(@var{window} @var{type}
5919
@var{data-array})}. This is an @code{or}-type hook---the first
5920
function that returns non-@code{nil} will terminate the hook call.
2834
5924
@node Standard Properties, Session Management, Standard Hooks, Top