[sawfish] Minor doc.



commit 034aa8507871c2b622728d40137e2a3a8746f70c
Author: Teika kazura <teika lavabit com>
Date:   Sat Jan 8 13:43:50 2011 +0900

    Minor doc.
    
    * Clarification in families of functions which return window geometry,
      with and without frame parts.
    * Update and minor correction in "Pointer Motion Hooks".
    * News brushup. (Not complete yet.)
    * (Not doc) Deleted one meaningless line from wm/commands.jl

 lisp/sawfish/wm/commands.jl           |   12 +---
 lisp/sawfish/wm/edge/viewport-drag.jl |    5 +-
 lisp/sawfish/wm/focus.jl              |    3 +-
 man/news.texi                         |   78 +++++++++++++++-------------
 man/sawfish.1                         |    4 +-
 man/sawfish.texi                      |   90 ++++++++++++---------------------
 sawfish.doap                          |    1 +
 src/main.c                            |    2 +-
 8 files changed, 86 insertions(+), 109 deletions(-)
---
diff --git a/lisp/sawfish/wm/commands.jl b/lisp/sawfish/wm/commands.jl
index 3d34a09..40ef8b4 100644
--- a/lisp/sawfish/wm/commands.jl
+++ b/lisp/sawfish/wm/commands.jl
@@ -1,4 +1,4 @@
-;; commands.jl -- managing the command database
+;; commands.jl -- manages commands
 ;;
 ;; Copyright (C) 2000 John Harper <john dcs warwick ac uk>
 ;;
@@ -74,15 +74,10 @@ evaluated.")
 
 ;;; defining commands
 
-  ;; each command has two properties: 'command-spec and 'command-fun
-
-  ;; (define-command 'foo
-  ;;   (lambda () ...))
-
   ;; spec is cadr of old (interactive ...) style thing
 
-  (define (getter symbol) (get symbol 'command-fun))
-  (define (setter symbol value) (put symbol 'command-fun value))
+  (define (getter name) (get name 'command-fun))
+  (define (setter name fun) (put name 'command-fun fun))
   (define autoloader (make-autoloader getter setter))
   (define real-getter (autoloader-ref getter))
 
@@ -191,7 +186,6 @@ command called NAME (optionally whose arguments have custom-type TYPE)."
       ;; postfix
       (call-hook 'post-command-hook (list name))
       (setq last-command this-command)
-      (setq this-command nil)
       (setq current-prefix-arg nil)))
 
   (define-command 'call-command call-command
diff --git a/lisp/sawfish/wm/edge/viewport-drag.jl b/lisp/sawfish/wm/edge/viewport-drag.jl
index c8fc7f1..85b9f78 100644
--- a/lisp/sawfish/wm/edge/viewport-drag.jl
+++ b/lisp/sawfish/wm/edge/viewport-drag.jl
@@ -1,7 +1,8 @@
 ;; viewport-drag.jl -- Smooth viewport motion with mouse
 
-;; Originally written by David T. McWherter <udmcwher mcs drexel edu>
-
+;; Based on dtm-infinite-desktop.jl in public domain, written by
+;; David T. McWherter <udmcwher mcs drexel edu>
+;; 
 ;; Copyright (C) 2010 Christopher Roy Bratusek <zanghar freent de>
 
 ;; This file is part of sawfish.
diff --git a/lisp/sawfish/wm/focus.jl b/lisp/sawfish/wm/focus.jl
index 22e1bee..766db5e 100644
--- a/lisp/sawfish/wm/focus.jl
+++ b/lisp/sawfish/wm/focus.jl
@@ -136,7 +136,8 @@ EVENT-NAME)', where EVENT-NAME may be one of the following symbols:
 	(window-put w 'keymap saved)
 	(window-put w 'focus-saved-keymap nil))))
 
-  ;; W is the focused window. Warp to it if a good idea
+  ;; W is the focused window. Warp to it if it conforms to
+  ;; the focus mode.
   (define (warp-pointer-if-necessary #!optional (w (input-focus)))
     (focus-invoke-mode w 'warp-if-necessary))
 
diff --git a/man/news.texi b/man/news.texi
index e84e6c7..cbe273c 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -6,7 +6,7 @@
 
 This lists user-visible changes, and which releases they occurred
 between. For more detailed information see the @file{ChangeLog} file
-in the Sawfish source tree, or git log.  (See Wiki page on how to
+in the Sawfish source tree, or git log.  (See the Wiki on how to
 access git repository.)
 
 @c @heading x.y.z ``Code name''
@@ -45,13 +45,15 @@ access git repository.)
 @itemize @minus
 @item Renamed function @code{popup-window-menu} to @code{popup-window-ops-menu} [Teika kazura]
 
-Both the function and the command are renamed. The old name is still supported,
-but it's recommended to update your configuration.
+It popups operations on a window. Both the function and the command
+are renamed. The old name is still supported, but it's recommended to
+update your configuration.
 
 @item User option @code{focus-ignore-pointer-events} is deleted. [Teika kazura] *
 In fact, it's for internal use, and should not have been a user option. Use your favorite focus mode instead.
 
 @item Syntax-change in @code{jump-or-exec} [Christopher Bratusek]
+
 The @code{class} and @code{onfocused} parameters are now keys, so pass them as
 #:class ''value'' or #:onfocused ''value''. Check @file{jump-or-exec.jl} for
 more detailed examples.
@@ -64,14 +66,14 @@ more detailed examples.
 Previously when installing to a private directory as an ordinary user, the installation failed, because some files
 were forced to be installed in /usr. This is fixed now. 
 
- item Chooseable session files [Christopher Bratusek]
+ item Session files installation [Christopher Bratusek]
 
-Now you can choose what session files to install. This is done by a tripplet of configure-options:
+Now you can choose which session files to install with these configure-options:
 
 @itemize *
- item --with/out-kde4session: enable or disable the installation of session files for KDE4. Default:â??enabled
- item --with/out-gnome2session: enable or disable the installation of session files for GNOME2. Default:â??enabled
- item --with/out-xdmsession: enable or disable the installation of session files for XDM (or other display-managers like
+ item @code{--with/out-kde4session}: enable or disable the installation of session files for KDE4. Default: enabled
+ item @code{--with/out-gnome2session}: enable or disable the installation of session files for GNOME2. Default: enabled
+ item @code{--with/out-xdmsession}: enable or disable the installation of session files for XDM (or other display-managers like
 KDM/GDM). Default: enabled
 @end itemize
 
@@ -95,6 +97,12 @@ It is ensured that SawfishPager builds correctly, by improving @file{sawfish.pc}
 
 Previously, user's change of the variable @code{kde-desktop-directories} was ignored, but this is fixed.
 
+ item At focus in/out, correctly reported the mode [Timo Korvola]
+
+When @code{focus-in-hook} / @code{focus-out-hook} are called,
+Sawfish wrongly reported a focus change during a grab as
+``ungrabbed''. Now it's reported as @code{while-grabbed}.
+
 @item Window cycle among groups [Teika Kazura]
 
 Some windows were skipped in window cycles among groups. This is fixed.
@@ -110,7 +118,7 @@ It used to print an error message when you cancel an interactive call of
 @item EdgeActions [Christopher Bratusek, Teika Kazura]
 
 EdgeActions is a centralized way for performing actions with your screen-edges. Lots of internal and
-user-visiable changes have been made.
+user-visible changes have been made.
 
 Internal changes:
 @itemize *
@@ -137,7 +145,7 @@ HotSpot functions need to be set via @file{~/.sawfishrc}, like this:
 ( defvar-setq top-left-corner-function
   ( lambda () ( display-message "hello world" ) ) )
 
-the lambda is very important -- it won't work else. Function names are pretty self-descriptive:
+the lambda is very important - it won't work else. Function names are pretty self-descriptive:
 position (eg: top-left or bottom) + variant (edge or corner) + "function".
 
 @item ViewportDrag now also works while moving a window.
@@ -165,24 +173,24 @@ You can choose from the following actions:
 By default nothing is done.
 @end itemize
 
- item ICCCM Manager Selection Support [Timo Korvola]
-Support for interchanging the Window-Manager via @code{--replace} flag, according to
-ICCCM has been added.
-
- item NotifyWhileGrabbed event [Harald van Dijk]
-Sawfish does now recognize (and handle) the NotifyWhileGrabbed event.
-Additionally NotifyUngrab is now handled explicitly.
+ item Replace running window manager with Sawfish [Timo Korvola] *
+New command line option @code{--replace} is added. With it, Sawfish
+replace will replace the currently running window manager. It's 
+done by ``manager selection'' defined in ICCCM secs 2.8 and 4.3.
 
 @item Toggle-Or-Exec wrapper added to Jump-Or-Exec [Christopher Bratusek]
- code{toggle-or-exec} is similar to jump-or-exec, but turns windows into
-quake-like drop-down/pop-up-windows. That means, when you have the toggle-window
-focused and press it's keybinding again, it will be hidden.
+
+ code{toggle-or-exec} is similar to jump-or-exec, but turns windows
+into quake-like drop-down/pop-up-windows. That means, when you have
+the toggle-window focused and press its keybinding again, it will be
+hidden. 
 
 See the file @file{jump-or-exec.jl} for more detailed examples.
 
 @item @code{iconify-on-leave} window-matcher [Christopher Bratusek]
-This new window-matcher is a companion to @code{toggle-or-exec}. When a window
-matched against it, looses the focus, it is beeing hidden. Use this together
+
+This new window-matcher is a companion to @code{toggle-or-exec}. When
+a window matched loses the focus, it gets hidden. Use this together
 with @code{toggle-or-exec} for greater toggle-window experience.
 
 @item New function @code{report-commands} [Teika kazura] *
@@ -193,19 +201,23 @@ It returns the list of all commands. (@pxref{Operations on Commands}).
 
 @item Tabs-NG [fuchur]
 
-Tabs-NG is a revised version of Sawfish's Tabbed-Windowing-System. Most changes are internal, but a few user-visible
+Sawfish's tabbed window system is revised. Most changes are internal, but a few user-visible
 ones have been done, too. When a lot of windows are open, it should now be more responsive.
 
-You now no longer need to change the tab-adjustments via SawfishConfig, when changing or customizing tab-enabled themes
+You no longer need to change the tab-adjustments via SawfishConfig, when changing or customizing tab-enabled themes
 (this is now done internally).
 
 Also there are now vertical and horizontal tabbar-prototypes available (see @code{DarkTab} theme), with a keymap both.
 The window-matcher @code{title-position} ensures that the position of the title will be restored, when using the @code{DarkTab} theme.
 
-Several smaller fixes have been done. (check @file{ChangeLog} for more detailed infos)
-
 @item The themes @code{Elberg-Tabbed} and @code{Get-S-Tabbed} have been updated to work
-with Tabs-NG. The theme @code{DarkTab} made by fuchur" is now the default theme.
+with Tabs-NG. The theme @code{DarkTab} made by fuchur is now the default theme.
+
+ item Behavior modification at focus-in [Harald van Dijk]
+
+In order to support ``gnome2-globalmenu'', the reaction behavior to
+ code{XFocusInEvent} is slightly modified. Sawfish doesn't emit
+ code{_NET_ACTIVE_WINDOW} if it's done by (un)grabbing the pointer.
 
 @item revised @code{get-window-by-*} functions [Christopher Bratusek]
 @itemize *
@@ -226,22 +238,14 @@ window-operations menu-entry @code{Resize} becomes unclickable.
 now bundled in the new @code{Workspace} sub-menu.
 @end itemize
 
- item @code{rename-window} function behavior-change [Christopher Bratusek]
-The function @code{rename-window} does now also change the _NET_WM_VISIBLE_NAME
-property of a window. 
-
 @item Translation related changes [Teika Kazura]
-
 @itemize +
 @item Added translator instructions in @file{po/README} file.
 @item Before you run @file{po/make-pot} to generate @file{sawfish.pot}, you
 now have to do @code{make all} at the top directory. Previously it was
 possible to produce wrong @file{sawfish.pot}.
- item The Spanish translation has been updated [gnome-es translation-team]
- item The German translation has been updated [gnome-de translation-team]
- item The Simplified-Chinese translation has been updated [gnome-zh_tw team]
- item The Norwegian/bokmÃ¥l translation has been updatedâ??[gnome-no team]
- item The Slovenian translation has been updated [gnome-sl team]
+ item Translation updates: Spanish [gnome-es team], German [gnome-de team],
+Simplified-Chinese [gnome-zh_CN team, Wang Lei], Norwegian/bokmål [gnome-no team], and Slovenian [gnome-sl team].
 @item Updated @file{sawfish.pot} and subsequently all @file{*.po}. Banished some bogus items in @file{sawfish.pot}.
 (Developer's personal extensions had sneaked in.)
 @end itemize
diff --git a/man/sawfish.1 b/man/sawfish.1
index 351f8f8..5325e3d 100644
--- a/man/sawfish.1
+++ b/man/sawfish.1
@@ -3,7 +3,7 @@
 sawfish \(em Sawfish window manager.
 .SH "SYNOPSIS"
 .PP
-\fBsawfish\fR [\fB\-\-display \fI[=DPY]\fR \fP]  [\fB\-\-multihead \fP]  [\fB\-\-visual \fI[=VISUAL]\fR \fP]  [\fB\-\-depth \fI[=DEPTH]\fR \fP]  [\fB\-\-disable-nls \fP]  [\fBFILE \fP]  [\fB\-\-batch \fP]  [\fB\-\-interp \fP]  [\fB-f, \-\-call \fIFUNCTION\fR \fP]  [\fB-l, \-\-load \fIFILE\fR \fP]  [\fB\-\-version \fP]  [\fB\-\-no-rc \fP] [\fB\-\-5\-buttons \fP] [\fB-q, \-\-quit \fP]
+\fBsawfish\fR  
 .SH "DESCRIPTION"
 .PP
 Sawfish is a lisp-extensible window manager for X11. Its aim is to
@@ -32,6 +32,8 @@ Don't load rc or site-init files.
 Terminate the interpreter process.
 .IP "\fB-\-5-buttons\fP" 10
 Support keyboard layout switching, but drop mouse buttons 6 - 8 support.
+.IP "\fB-\-replac\fP" 10
+Replace the running window manager with Sawfish.
 .SS Display Options
 .IP "\fB\-\-display=\fIDPY\fR\fP" 10
 Connect to X display \fIDPY\fR.
diff --git a/man/sawfish.texi b/man/sawfish.texi
index cdac89f..58fa14f 100644
--- a/man/sawfish.texi
+++ b/man/sawfish.texi
@@ -770,13 +770,15 @@ Returns the numeric ID of the root window of the managed screen.
 @end defun
 
 @defun window-dimensions window
-Returns a cons cell @code{(@var{width} . @var{height})} defining the
-dimensions of the client window associated with object @var{window}.
+Returns the size of the window @var{window} in a cons cell
+ code{(@var{width} . @var{height})}. This does @emph{not} include the
+frame. The size including the frame is returned by
+ code{window-frame-dimensions}  (@pxref{Frame Functions})
 @end defun
 
 @defun window-position window
-Returns a cons-cell @code{(@var{x} . @var{y})} defining the position
-relative to the root window of @var{window}.
+Returns the position of the window decorated with the frame in a
+cons-cell @code{(@var{x} . @var{y})}.
 @end defun
 
 @defun display-window-position @t{#!optional} window
@@ -3752,18 +3754,17 @@ and recalibrated.
 @end defun
 
 @defun window-frame-dimensions window
-Return a cons cell @code{(@var{width} . @var{height})} defining the
-dimensions of the frame associated with @var{window}. These will always
-be greater than or equal to the dimensions of the client window.
+Return the size of the window @var{window} including the frame, in a
+cons cell @code{(@var{width} . @var{height})}.
 
-If @var{window} is not framed, then this function returns the same
-values as @code{window-dimensions} would.
+The size excluding the frame is returned by
+ code{window-dimensions}  (@pxref{Window Attributes})
 @end defun
 
 @defun window-frame-offset window
 Return a cons cell @code{(@var{x} . @var{y})} defining the offset from
 the origin of the client window associated with @var{window} to the
-origin of its frame.
+origin of its frame. That is, their values are negative integers.
 @end defun
 
 @defun window-border-width window
@@ -6883,9 +6884,9 @@ The available hooks are listed below.
 The hook functions are passed one argument which is the command name.
 
 @defvr {Hook} pre-command-hook
-Called before each command is evaluated. If you set the value
- code{this-command} to @code{nil} in this hook, then the command
-won't be executed.
+Called before invocation of each command. You can modify
+ code{this-command} here. In particular, if it's set to @code{nil} in
+this hook, then the command won't be executed.
 @end defvr
 
 @defvr {Hook} post-command-hook
@@ -7088,74 +7089,47 @@ Currently only @code{urgency} is monitored.  The hint is an additional
 argument to the hook.
 @end defvr
 
-
 @node Pointer Motion Hooks, Workspace and Viewport Hooks, X Hooks, Standard Hooks
 @section Pointer Motion Hooks
 @cindex Pointer Motion Hooks
 @cindex Hooks, Pointer Motion
 
-In the hooks below, @var{focus-mode} is one of the symbols
- code{normal}, @code{grab} or @code{ungrab}.
-
 @defvr {Window Hook} enter-notify-hook
 @defvrx {Window Hook} enter-frame-part-hook
-Called when the pointer enters a window (including the root window).
-
-If the window was part of a frame, then @code{enter-frame-part-hook}
-is called with three arguments: the window, the frame part class
-(@pxref{Frame Part Classes}), and @var{focus-mode}.
-
-Otherwise @code{enter-notify-hook} is called with two arguments: the
-window and @var{focus-mode}.
-
-The root window is considered to be a valid window for this hook.
-Sawfish will report entering the root window.
- end defvr
-
- defvr {Window Hook} leave-notify-hook
+ defvrx {Window Hook} leave-notify-hook
 @defvrx {Window Hook} leave-frame-part-hook
-Called when the pointer leaves a window (including the root window).
+Called when the pointer enters or leaves a window, respectively.
 
-If the window was part of a frame, then @code{leave-frame-part-hook}
-is called with three arguments: the window, the frame part class
-(@pxref{Frame Part Classes}), and @var{focus-mode}.
+If the window was part of a frame, then @code{enter-frame-part-hook}
+or @code{leave-frame-part-hook} is called with three arguments: the
+window, the frame part class (@pxref{Frame Part Classes}), and
+ var{mode}  @var{mode} is one of the symbols @code{normal},
+ code{grab} or @code{ungrab}.
 
-Otherwise @code{leave-notify-hook} is called with two arguments: the
-window and @var{focus-mode}.
+Otherwise @code{enter-notify-hook} or @code{leave-notify-hook} is
+called with two arguments: the window and @var{mode}.
 
-The root window is considered to be a valid window for this hook.
-Sawfish will report leaving the root window.
+Entering the root window is reported, too. In that case, the
+symbol @code{root} is returned in place of a window object.
 @end defvr
 
 @defvr {Window Hook} focus-in-hook
-Called when focus gains focus.  The hook functions take two arguments:
-the window that received focus, and @var{focus-mode}.
+ defvrx {Window Hook} focus-out-hook
+Called when a window gains or loses focus, respectively.  The hook
+function receives two arguments: the window that received / lost
+focus, and @var{mode}. @var{mode} is one of the symbols @code{normal},
+ code{grab}, @code{ungrab} or @code{while-grabbed}.
 
-If your @var{focus-mode} is set to @code{enter-exit}, your window
+If your @code{focus-mode} is set to @code{enter-exit}, your window
 focus is tightly bound to your pointer position; focus-related hooks
 and enter/leave hooks will be called in lockstep.  For other values of
 @code{focus-mode}, Sawfish will trigger fewer focus-related hook calls
 than enter/leave hook calls.
 
 This hook is never called for the root window, because the root window
-never gets focus.
+never gets nor loses focus.
 @end defvr
 
- defvr {Window Hook} focus-out-hook
-Called when a window loses focus.  The hook functions take two
-arguments: the window that lost focus, and @var{focus-mode}.
-
-If your @var{focus-mode} is set to @code{enter-exit}, your window
-focus is tightly bound to your pointer position; focus-related hooks
-and enter/leave hooks will be called in lockstep.  For other values of
- code{focus-mode}, Sawfish will trigger fewer focus-related hook calls
-than enter/leave hook calls.
-
-This hook is never called for the root window, because the root window
-never gets focus.
- end defvr
-
-
 @node Workspace and Viewport Hooks, Startup and Shutdown Hooks, Pointer Motion Hooks, Standard Hooks
 @section Workspace and Viewport Hooks
 @cindex Workspace Hooks
diff --git a/sawfish.doap b/sawfish.doap
index 9859bc6..46d7b81 100644
--- a/sawfish.doap
+++ b/sawfish.doap
@@ -1,3 +1,4 @@
+<!-- Used by GNOME repository -->
 <Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
          xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#";
          xmlns:foaf="http://xmlns.com/foaf/0.1/";
diff --git a/src/main.c b/src/main.c
index fb98eb7..c2ba1fb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -456,7 +456,7 @@ where OPTIONS are any of:\n\
 \n\
     --display=DPY	Connect to X display DPY\n\
     --multihead		Fork a copy of sawfish for each screen\n\
-    --replace		Replace the running window manager\n\
+    --replace		Replace the running window manager with Sawfish\n\
     --visual=VISUAL	Preferred visual type\n\
     --depth=DEPTH	Preferred color depth\n\
     --disable-nls	Disable internationalization of messages\n\



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]