[clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-130-gc663050

Philippe Brochard pbrochard at common-lisp.net
Sun Oct 7 20:58:57 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  c6630509c047b34c4237c367757dd9608d7b6560 (commit)
      from  d469c53c7fbde75f99300b8953e1719e0a59603b (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 c6630509c047b34c4237c367757dd9608d7b6560
Author: Philippe Brochard <pbrochard at common-lisp.net>
Date:   Sun Oct 7 22:58:49 2012 +0200

    src/clfswm-internal.lisp (place-frames-from-xinerama-infos): handle better no xinerama support case.

diff --git a/ChangeLog b/ChangeLog
index 026e3a9..927932a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-07  Philippe Brochard  <pbrochard at common-lisp.net>
+
+	* src/clfswm-internal.lisp (place-frames-from-xinerama-infos):
+	handle better no xinerama support case.
+
 2012-10-04  Philippe Brochard  <pbrochard at common-lisp.net>
 
 	* contrib/wallpaper.lisp (generate-wallpaper): Force waiting the
diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp
index 0c93dbe..964f4b9 100644
--- a/src/clfswm-internal.lisp
+++ b/src/clfswm-internal.lisp
@@ -651,10 +651,6 @@
   (defun define-as-root (child x y width height)
     (push (make-root :child child :original child :current-child nil :x x :y y :w width :h height) root-list))
 
-  (defun unsure-at-least-one-root ()
-    (unless root-list
-      (define-as-root *root-frame* 0 0 (xlib:screen-width *screen*) (xlib:screen-height *screen*))))
-
   (defun find-root-by-coordinates (x y)
     (dolist (root root-list)
       (when (in-rect x y (root-x root) (root-y root) (root-w root) (root-h root))
@@ -759,6 +755,17 @@
 
 (defsetf current-child current-child-setter)
 
+(defun ensure-at-least-one-root ()
+  (unless (get-root-list)
+    (let ((frame (create-frame)))
+      (add-frame frame *root-frame*)
+      (define-as-root frame 0 0 (xlib:screen-width *screen*) (xlib:screen-height *screen*))
+      (add-frame (create-frame) frame))))
+
+
+
+
+
 
 (defun is-in-current-child-p (child)
   (and (frame-p (current-child))
@@ -837,7 +844,7 @@ XINERAMA version 1.1 opcode: 150
        do (let ((frame (create-frame)))
             (add-frame frame *root-frame*)))
     ;; On the opposite way: remove frames until there is more than screen heads in *root-frame*
-    (when (> (length (frame-child *root-frame*)) (length sizes))
+    (when (and sizes (> (length (frame-child *root-frame*)) (length sizes)))
       (dotimes (i (- (length (frame-child *root-frame*)) (length sizes)))
         (let ((deleted-child (pop (frame-child *root-frame*))))
           (typecase deleted-child
@@ -856,8 +863,8 @@ XINERAMA version 1.1 opcode: 150
             ;;(add-placed-frame-tmp frame 2)  ;; For tests
             (unless (frame-child frame)
               (add-frame (create-frame) frame))
-            (define-as-root frame x y w h)))
-    (setf (current-child) (first (frame-child (first (frame-child *root-frame*)))))))
+            (define-as-root frame x y w h)))))
+
 
 
 
diff --git a/src/clfswm.lisp b/src/clfswm.lisp
index 1c076df..c833ce2 100644
--- a/src/clfswm.lisp
+++ b/src/clfswm.lisp
@@ -198,11 +198,9 @@
 
 
 (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) frame)))
+  (place-frames-from-xinerama-infos)
+  (ensure-at-least-one-root)
+  (setf (current-child) (first (frame-child (first (frame-child *root-frame*))))))
 
 
 (defun init-display ()
@@ -247,7 +245,6 @@
   (setf *root-frame* (create-frame :name "Root" :number 0)
 	(current-child) *root-frame*)
   (call-hook *init-hook*)
-  (unsure-at-least-one-root)
   (process-existing-windows *screen*)
   (show-all-children)
   (grab-main-keys)
diff --git a/src/config.lisp b/src/config.lisp
index 69c861e..6d0932d 100644
--- a/src/config.lisp
+++ b/src/config.lisp
@@ -159,9 +159,7 @@ This command must set the window title to *clfswm-terminal-name*")
 ;;;
 ;;; See clfswm.lisp for hooks examples.
 
-(defconfig *init-hook* '(default-init-hook
-                         place-frames-from-xinerama-infos
-                         display-hello-window)
+(defconfig *init-hook* '(default-init-hook display-hello-window)
   'Hook "Init hook. This hook is run just after the first root frame is created")
 
 (defconfig *close-hook* '(close-notify-window close-clfswm-terminal close-virtual-keyboard)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                |    5 +++++
 src/clfswm-internal.lisp |   21 ++++++++++++++-------
 src/clfswm.lisp          |    9 +++------
 src/config.lisp          |    4 +---
 4 files changed, 23 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
CLFSWM - A(nother) Common Lisp FullScreen Window Manager




More information about the clfswm-cvs mailing list