[sawfish] Doc in edge and news. Minor cleanups.



commit bff452d9a8df63f91ddc934a832a048d6bd680a5
Author: Teika kazura <teika lavabit com>
Date:   Tue Feb 1 14:11:07 2011 +0900

    Doc in edge and news. Minor cleanups.
    
    * News items are also sorted.

 lisp/sawfish/wm/edge/actions.jl       |    2 +-
 lisp/sawfish/wm/edge/flip.jl          |    2 +-
 lisp/sawfish/wm/edge/hot-spots.jl     |    2 +-
 lisp/sawfish/wm/edge/util.jl          |   13 ++--
 lisp/sawfish/wm/edge/viewport-drag.jl |    2 +-
 lisp/sawfish/wm/ext/shade-hover.jl    |    3 +-
 lisp/sawfish/wm/ext/tooltips.jl       |    3 +-
 lisp/sawfish/wm/focus.jl              |    3 +-
 man/news.texi                         |  104 ++++++++++++++------------------
 src/flippers.c                        |    3 +-
 10 files changed, 60 insertions(+), 77 deletions(-)
---
diff --git a/lisp/sawfish/wm/edge/actions.jl b/lisp/sawfish/wm/edge/actions.jl
index 991d97b..772f1ba 100644
--- a/lisp/sawfish/wm/edge/actions.jl
+++ b/lisp/sawfish/wm/edge/actions.jl
@@ -1,4 +1,4 @@
-;; edge-action.jl -- Edges taken to another dimension
+;; edge/actions.jl -- Sets up central user interface of edge-actions
 
 ;; Copyright (C) 2010 Christopher Roy Bratusek <zanghar freenet de>
 
diff --git a/lisp/sawfish/wm/edge/flip.jl b/lisp/sawfish/wm/edge/flip.jl
index 7036442..678e1ea 100644
--- a/lisp/sawfish/wm/edge/flip.jl
+++ b/lisp/sawfish/wm/edge/flip.jl
@@ -1,4 +1,4 @@
-;; edge-flip.jl -- move viewports by pushing pointer against screen edges
+;; flip.jl -- move viewport / workspace like flipping pages
 
 ;; Copyright (C) 1999 John Harper <john dcs warwick ac uk>
 ;; Copyright (C) 2010 Christopher Roy Bratusek <zanghar freenet de>
diff --git a/lisp/sawfish/wm/edge/hot-spots.jl b/lisp/sawfish/wm/edge/hot-spots.jl
index c84e8ae..c052409 100644
--- a/lisp/sawfish/wm/edge/hot-spots.jl
+++ b/lisp/sawfish/wm/edge/hot-spots.jl
@@ -1,4 +1,4 @@
-;; hot-spots.jl 3.0.0 -- Invoke user functions when hitting the screen-edge
+;; hot-spots.jl -- Invoke lisp functions when hitting the screen-edge
 
 ;; Copyright (C) 2010 Christopher Roy Bratusek <zanghar freenet de>
 
diff --git a/lisp/sawfish/wm/edge/util.jl b/lisp/sawfish/wm/edge/util.jl
index e6b8504..7754c1b 100644
--- a/lisp/sawfish/wm/edge/util.jl
+++ b/lisp/sawfish/wm/edge/util.jl
@@ -1,4 +1,4 @@
-;; edge-util.jl -- common utils for EdgeActions
+;; edge/util.jl -- common utils for EdgeActions
 
 ;; Copyright (C) 2010 Christopher Roy Bratusek <zanghar freenet de>
 
@@ -20,11 +20,9 @@
 
 (define-structure sawfish.wm.edge.util
 
-    (compound-interface
-     (structure-interface sawfish.wm.edge.subrs)
-     (export activate-flippers
-	     get-active-corner
-	     get-active-edge))
+    (export activate-flippers
+	    get-active-corner
+	    get-active-edge)
 
     (open rep
 	  rep.system
@@ -48,7 +46,8 @@
       (remove-hook 'randr-change-notify-hook recreate-flippers)))
 
   (defcustom hot-spots-corner-lenght 50
-    "Lenght in px (in both x and y direction) wich is used for the hot-spot corners."
+    "In hot-spot, this size portion is recognized as \"corners\".
+The unit is pixel, and applies to both x and y direction."
     :type number
     :range (5 . 500)
     :group edge-actions)
diff --git a/lisp/sawfish/wm/edge/viewport-drag.jl b/lisp/sawfish/wm/edge/viewport-drag.jl
index 85b9f78..3b137c3 100644
--- a/lisp/sawfish/wm/edge/viewport-drag.jl
+++ b/lisp/sawfish/wm/edge/viewport-drag.jl
@@ -35,7 +35,7 @@ screen edge."
     :range (1 . nil))
 
   (defcustom viewport-drag-cursor-distance 32
-    "Amount to pull back the cursor (in pixer) after dragging the viewport."
+    "Amount to pull back the cursor (in pixel) after dragging the viewport."
     :group edge-actions
     :type number
     :range (1 . nil))
diff --git a/lisp/sawfish/wm/ext/shade-hover.jl b/lisp/sawfish/wm/ext/shade-hover.jl
index 586f47f..328d4a9 100644
--- a/lisp/sawfish/wm/ext/shade-hover.jl
+++ b/lisp/sawfish/wm/ext/shade-hover.jl
@@ -64,8 +64,7 @@ over them.)"
       (delete-timer shade-hover-timer)
       (setq shade-hover-timer nil))
     (setq shade-hover-window nil)
-    (when (in-hook-p 'pre-command-hook shade-hover-before)
-      (remove-hook 'pre-command-hook shade-hover-before)))
+    (remove-hook 'pre-command-hook shade-hover-before))
 
   (define (shade-hover-leave w)
     (when (eq shade-hover-window w)
diff --git a/lisp/sawfish/wm/ext/tooltips.jl b/lisp/sawfish/wm/ext/tooltips.jl
index 085b3fb..b223e1d 100644
--- a/lisp/sawfish/wm/ext/tooltips.jl
+++ b/lisp/sawfish/wm/ext/tooltips.jl
@@ -119,8 +119,7 @@
 	(add-hook 'pre-command-hook remove-tooltip))))
 
   (define (remove-tooltip)
-    (when (in-hook-p 'pre-command-hook remove-tooltip)
-      (remove-hook 'pre-command-hook remove-tooltip))
+    (remove-hook 'pre-command-hook remove-tooltip)
     (when tooltips-displayed
       (display-message nil)
       (setq tooltips-displayed nil))
diff --git a/lisp/sawfish/wm/focus.jl b/lisp/sawfish/wm/focus.jl
index e310b5b..5acd8fe 100644
--- a/lisp/sawfish/wm/focus.jl
+++ b/lisp/sawfish/wm/focus.jl
@@ -224,8 +224,7 @@ EVENT-NAME)', where EVENT-NAME may be one of the following symbols:
   (define (raise-tabs-on-hover-setter)
     (if tab-raise-on-hover
         (add-hook 'enter-frame-part-hook raise-tabs-on-hover-action)
-      (when (in-hook-p 'enter-frame-part-hook raise-tabs-on-hover-action)
-        (remove-hook 'enter-frame-part-hook raise-tabs-on-hover-action))))
+      (remove-hook 'enter-frame-part-hook raise-tabs-on-hover-action)))
 
   (define (focus-click)
     (let ((w (current-event-window))
diff --git a/man/news.texi b/man/news.texi
index 81cc09d..b35db6d 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -43,6 +43,16 @@ access git repository.)
 
 @item Notes
 @itemize @minus
+ item Infinite-desktop and edge-flip needs updates.
+
+Open the configurator -> ``Edge Actions''. Changes must be easy.  (Set
+4 pull-downs, and you're done mostly. ``Infinite-desktop'' is renamed to
+``viewport-drag''.) For more options, see ``Edge Actions'' below.
+
+If your @file{~/.sawfish/rc} opens related modules, delete them. These
+modules are renamed, and you don't have to manually load them any
+more.
+
 @item Function renames [Teika kazura]
 @itemize
 @item Popup of operations-menu on a window, from @code{popup-window-menu} to @code{popup-window-ops-menu} (both the function and command). Old names are still available.
@@ -51,14 +61,14 @@ access git repository.)
 
 Even if the old names still remain, it is highly recommended to update.
 
- 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.
+
+ 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.
 @end itemize
 @item Build and Installation
 @itemize @minus
@@ -94,10 +104,6 @@ invoked, if run without any desktop environment. Fixed it.
 
 It is ensured that SawfishPager builds correctly, by improving @file{sawfish.pc} file.
 
- item KDE *.desktop files location [Teika Kazura]
-
-Previously, user's change of the variable @code{kde-desktop-directories} was ignored, but this is fixed.
-
 @item At focus in/out, correctly reports the mode [Timo Korvola]
 
 When @code{focus-in-hook} / @code{focus-out-hook} are called,
@@ -112,66 +118,47 @@ Some windows were skipped in window cycles among groups. This is fixed.
 
 It used to print an error message when you cancel an interactive call of
 @code{call-command} with the escape key, but it doesn't any more.
- end itemize
- item New Features
- itemize @minus
 
- item EdgeActions [Christopher Bratusek, Teika Kazura]
-
-EdgeActions is a centralized way for performing actions with your screen-edges. Lots of internal and
-user-visible changes have been made.
-
-Internal changes:
- itemize *
+ item KDE *.desktop files location [Teika Kazura]
 
- item Some functions have been moved from Lisp to C-Part. Also EdgeFlip has been highly revised, so that
-other technics (namely ViewportDrag and HotSpots) do no longer depend on active EdgeFlip (no more conflicts)
- item The module @code{sawfish.wm.edge.actions} contains the EdgeAction infrastructure and most options
- item The module @code{sawfish.wm.edge.util} contains helper functions for EdgeActions
- item The module @code{sawfish.wm.edge.subrs} contains the C-Part subroutines for EdgeActions
- item InfiniteDesktop is renamed to ViewportDrag (more self-descriptive)
- item General code-revision. Less but more powerful code is now in use
+Previously, user's change of the variable @code{kde-desktop-directories} was ignored, but this is fixed.
 @end itemize
+ item New Features
+ itemize @minus
 
-User-visible changes:
- itemize *
- item Centralized customization ("Edge Actions" group in SawfishConfig)
- item EdgeFlip changes. Additionally to the above stated internal changes, EdgeFlip has been split into
-EdgeFlip/Viewport and EdgeFlip/Workspace, giving you more customizability.
- item HotSpots have been added. HotSpots let you call functions when hitting either the corners or the edges.
-By default the corners extend by 50 px in both directions along the edge, this value is changable.
-
-HotSpot functions need to be set via @file{~/.sawfishrc}, like this:
-
-( defvar-setq top-left-corner-function
-  ( lambda () ( display-message "hello world" ) ) )
+ item Edge Actions [Christopher Bratusek]
 
-the lambda is required - it won't work else. Function names are pretty self-descriptive:
-position (eg: top-left or bottom) + variant (edge or corner) + "function".
+``Edge Actions'' is a centralized way to invoke an action when the
+mouse pointer hits a screen-edge. It includes former ``edge-flip'' and
+``infinite-desktop'' (now renamed to ``viewport-drag''), and a new
+feature ``hot-spot''.
 
- item ViewportDrag now also works while moving a window.
- item Delay-timer changes. ViewportDrag doesn't have a delay anymore (doesn't quite make sense). 
-HotSpots andâ??EdgeFlip have both their own, customizable timer.
- item Actions are now split as follows:
+Edge-flip and viewport-drag can be configured from the
+configurator ``Edge Actions'' group. Options must be easy to
+understand.
 
-top-bottom (normal)
-top-bottom (while moving)
+``Hot-spot'' lets you assign an action to each screen-edge and
+-corner. An action has to be a function, and can be set in
+ file{~/.sawfish/rc}, like this:
 
-left-right (normal)
-left-right (while moving)
+ lisp
+(defvar-setq top-left-corner-function
+  (lambda () (display-message "hello world")))
+ end lisp
 
-That means that you have better control what to do and when, as actions for when hitting the edge/corner with
-the pointer ("normal") and for when hitting the edge/corner while moving a window are split now.
+Hot-spot variable names consist of position (e.g. top-left or bottom) + ``edge''/''corner'' + ``function''. A lisp expression will be evaluated in the @code{user} module.
 
-You can choose from the following actions:
- itemize â??
- item flip-viewport (traditional EdgeFlip for Viewports)
- item flip-workspace (traditional EdgeFlip for Workspaces)
- item viewport-drag (drag Viewport to pseudo-increase it's size making it "infinite")
- item none/hot-spots (either perform nothing or -if user-set- a HotSpot function)
+Other related changes are:
+ itemize *
+ item Viewport-drag and edge-flip (of course hot-spot, too) can be chosen per direction, top-bottom and left-right. It's also possible to enable / disable dragging of a window for each of them.
+ item It means a window can be dragged during viewport-drag, which was not possible.
+ item There're two delay timers now, for edge-flip and hot-spot.
 @end itemize
 
-By default nothing is done.
+Internal changes:
+ itemize *
+ item Codes are found in @code{sawfish.wm.edge.*}. You don't have to import them for ordinary use.
+ item Low-level functions now have API in @code{sawfish.wm.edge.util} written in Lisp.
 @end itemize
 
 @item Replace running window manager with Sawfish [Timo Korvola] *
@@ -223,12 +210,12 @@ In order to support ``gnome2-globalmenu'', the reaction policy 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]
+ item Revised @code{get-window-by-*} functions [Christopher Bratusek]
 
 For the details, see @xref{Window Attributes}, and @xref{Getting Windows}.
 @itemize *
 @item Added functions @code{window-role} and @code{get-window-by-role} (return NET_WM_ROLE) 
- item Deleted @code{get-window-by-name-re} and @code{get-window-by-class-re}. Use instead @code{get-window-by-name} or @code{get-window-by-class} with the new option @code{#:regex}. (The old name is still supported.)
+ item Deleted @code{get-window-by-name-re} and @code{get-window-by-class-re}. Use instead @code{get-window-by-name} or @code{get-window-by-class} with the new boolean option @code{#:regex}. (The old name is still supported.)
 @item added @code{#:icon} switch to @code{get-window-by-name} to get a window via NET_WM_ICON_NAME (can be used with #:regex switch, too)
 @end itemize
 
@@ -255,11 +242,12 @@ team] French [gnome-fr team], and Slovenian [gnome-sl team].
 (Developer's personal extensions had sneaked in.)
 @end itemize
 
- item Emacs sawfish-mode now indents @code{let-fluids} and let-loop correctly [Teika Kazura]
+ item Emacs sawfish-mode now indents @code{let-fluids} and let-loop correctly, provided by @file{sawfish.el} [Teika Kazura]
 @item Turn `focus-ignore-pointer-events' into an internal variable (has wrongly been a user-option before) [Teika Kazura]
 @item Documentations [Teika kazura]
 @itemize
 @item Section on popup menus is rewritten. (@pxref{Popup Menus})
+ item Functions which return window geometry are now clarified in the point of frames.
 @item Correction: The function @code{commandp} can only take symbols as its argument. (@pxref{Operations on Commands})
 @end itemize
 
diff --git a/src/flippers.c b/src/flippers.c
index ee81192..e4e27d1 100644
--- a/src/flippers.c
+++ b/src/flippers.c
@@ -1,5 +1,4 @@
-/* flippers.c -- viewport edge flipping mechanism
-   $Id$
+/* flippers.c -- Screen edge sensors
 
    Copyright (C) 1999 John Harper <john dcs warwick ac uk>
 



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