[clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-25-gdc020bc
Philippe Brochard
pbrochard at common-lisp.net
Wed Apr 18 20:35:47 UTC 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CLFSWM - A(nother) Common Lisp FullScreen Window Manager".
The branch, master has been updated
via dc020bc9d3df37ce55936bbe4f18d9ad0bde4f42 (commit)
from 9a295e721720d5e8485e9bd10ebd049627f9b1b1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit dc020bc9d3df37ce55936bbe4f18d9ad0bde4f42
Author: Philippe Brochard <pbrochard at common-lisp.net>
Date: Wed Apr 18 22:35:42 2012 +0200
src/tools.lisp (add-new-hook, add-hook): New macro. Do not duplicate hooks by default. Use add-new-hook if you want to duplicate them.
diff --git a/ChangeLog b/ChangeLog
index b1ba271..68af51b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-04-18 Philippe Brochard <pbrochard at common-lisp.net>
+
+ * src/tools.lisp (add-new-hook, add-hook): New macro. Do not
+ duplicate hooks by default. Use add-new-hook if you want to
+ duplicate them.
+
2012-04-16 Philippe Brochard <pbrochard at common-lisp.net>
* src/clfswm-corner.lisp (wait-window-in-query-tree): Add a limit
diff --git a/TODO b/TODO
index 89275af..e615c5c 100644
--- a/TODO
+++ b/TODO
@@ -7,13 +7,14 @@ URGENT PROBLEMS
===============
Should handle these soon.
--> Nothing here yet.
FOR THE NEXT RELEASE
====================
-- Implement a save/restore root-frame system. And use it on error reset.
+- Implement a save/restore root-frame system. And use it on error reset or for undo/redo.
+
+- Add a modeline in contrib/
MAYBE
=====
diff --git a/src/clfswm-util.lisp b/src/clfswm-util.lisp
index 06af769..553cdfb 100644
--- a/src/clfswm-util.lisp
+++ b/src/clfswm-util.lisp
@@ -1661,8 +1661,8 @@ For window: set current child to window or its parent according to window-parent
(with-current-window
(decf (child-transparency window) 0.1)))
-;;; Multiple physical screen helper
+;;; Multiple physical screen helper
(defun get-xrandr-connected-size ()
(let ((output (do-shell "xrandr"))
(sizes '()))
diff --git a/src/tools.lisp b/src/tools.lisp
index f4587f1..63678d0 100644
--- a/src/tools.lisp
+++ b/src/tools.lisp
@@ -42,6 +42,7 @@
:symbol-search
:create-symbol :create-symbol-in-package
:call-hook
+ :add-new-hook
:add-hook
:remove-hook
:clear-timers
@@ -232,15 +233,25 @@ Return the result of the last hook"
result)))
-(defmacro add-hook (hook &rest value)
+(defmacro add-new-hook (hook &rest value)
+ "Add a hook. Duplicate it if needed"
`(setf ,hook (append (typecase ,hook
(list ,hook)
(t (list ,hook)))
(list , at value))))
+(defmacro add-hook (hook &rest value)
+ "Add a hook only if not duplicated"
+ (let ((i (gensym)))
+ `(dolist (,i (list , at value) ,hook)
+ (unless (member ,i (typecase ,hook
+ (list ,hook)
+ (t (list ,hook))))
+ (add-new-hook ,hook ,i)))))
+
(defmacro remove-hook (hook &rest value)
(let ((i (gensym)))
- `(dolist (,i (list , at value))
+ `(dolist (,i (list , at value) ,hook)
(setf ,hook (remove ,i ,hook)))))
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
TODO | 5 +++--
src/clfswm-util.lisp | 2 +-
src/tools.lisp | 15 +++++++++++++--
4 files changed, 23 insertions(+), 5 deletions(-)
hooks/post-receive
--
CLFSWM - A(nother) Common Lisp FullScreen Window Manager
More information about the clfswm-cvs
mailing list