[clfswm-devel] [PATCH] Let users decide whether or not create a default frame when starting up

Xavier Maillard xma at gnu.org
Sun Apr 13 23:15:42 UTC 2008


In this patch, we just move the default frame creation into the
*init-hook* hook. So users just have to tweak the hook definition if
they do not want to have a default frame when CLFSWM starts.

Signed-off-by: Xavier Maillard <xma at gnu.org>
---
If you decide to apply this patch, do not forget to also apply
patch 183669702cf10737746efc80ad16737846afb9a4 ('Do not create
another empty frame on startup.')

You will have to amend the patch to change the commit message
though.

 src/package.lisp |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/package.lisp b/src/package.lisp
index 21a4591..20c2e4c 100644
--- a/src/package.lisp
+++ b/src/package.lisp
@@ -129,7 +129,13 @@ others in the same frame")
 ;;; See clfswm.lisp for hooks examples.
 
 ;;; Init hook. This hook is run just after the first root frame is created
-(defparameter *init-hook* nil)
+(defun default-init-hook ()
+  (let ((frame (add-frame (create-frame :name "Default"
+                                        :layout nil :x 0.05 :y 0.05
+                                        :w 0.9 :h 0.9) *root-frame*)))
+    (setf *current-child* (first (frame-child *current-root*)))))
+
+(defparameter *init-hook* #'default-init-hook)
 
 ;;; Main mode hooks (set in clfswm.lisp)
 (defparameter *button-press-hook* nil)
-- 
1.5.2.2



More information about the clfswm-devel mailing list