[Clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-64-g8fb65ba

Philippe Brochard pbrochard at common-lisp.net
Wed Nov 5 23:45:12 UTC 2014


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  8fb65ba011b2d50b8b3c5fd4462116dc6269c7a8 (commit)
      from  7c63375c46e4eede7ae29dca007094ef55992f18 (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 8fb65ba011b2d50b8b3c5fd4462116dc6269c7a8
Author: Philippe Brochard <pbrochard at common-lisp.net>
Date:   Thu Nov 6 00:45:48 2014 +0100

    Find free keys instead of incrementing the last one for each new child

diff --git a/src/clfswm-expose-mode.lisp b/src/clfswm-expose-mode.lisp
index acb0e62..8ea964d 100644
--- a/src/clfswm-expose-mode.lisp
+++ b/src/clfswm-expose-mode.lisp
@@ -28,7 +28,7 @@
 (defparameter *expose-font* nil)
 (defparameter *expose-selected-child* nil)
 
-(defstruct expose-child child key window gc string)
+(defstruct expose-child number child key window gc string)
 
 (defun leave-expose-mode ()
   "Leave the expose mode"
@@ -51,13 +51,16 @@
 
 (defun expose-associate-keys ()
   (let* ((all nil)
-         (new nil))
+         (new nil)
+	 (all-numbers (loop for ec in *expose-child-list*
+			 collect (expose-child-number ec))))
     (with-all-children-reversed (*root-frame* child)
       (unless (child-equal-p child *root-frame*)
         (push child all)
         (unless (member child *expose-child-list* :test #'child-equal-p :key #'expose-child-child)
-          (push (make-expose-child :child child :key (number->letter *expose-current-number*)) new)
-          (incf *expose-current-number*))))
+	  (let ((number (find-free-number all-numbers)))
+	    (push (make-expose-child :child child :number number :key (number->letter number)) new)
+	    (push number all-numbers)))))
     (append (remove-if-not (lambda (x) (member x all :test #'child-equal-p)) *expose-child-list*
                            :key #'expose-child-child)
             (nreverse new))))
diff --git a/src/clfswm.lisp b/src/clfswm.lisp
index e5721ed..3a6da96 100644
--- a/src/clfswm.lisp
+++ b/src/clfswm.lisp
@@ -216,7 +216,6 @@
 					    :drawable *root*)
 	*in-second-mode* nil
         *x-error-count* 0
-        *expose-current-number* 0
         *expose-child-list* nil)
   (store-root-background)
   (init-modifier-list)
@@ -342,6 +341,3 @@
 	       (format t "~&~A~%Reinitializing...~%" msg)
 	       (setf error-msg (list (list msg *info-color-title*)
 				     "Reinitializing...")))))))))
-
-
-
diff --git a/src/package.lisp b/src/package.lisp
index 43919f1..cf34c41 100644
--- a/src/package.lisp
+++ b/src/package.lisp
@@ -86,7 +86,6 @@ It is particulary useful with CLISP/MIT-CLX.")
 (defparameter *background-image* nil)
 (defparameter *background-gc* nil)
 
-(defparameter *expose-current-number* 0)
 (defparameter *expose-child-list* nil)
 
 (defconfig *loop-timeout* 1 nil

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

Summary of changes:
 src/clfswm-expose-mode.lisp | 11 +++++++----
 src/clfswm.lisp             |  4 ----
 src/package.lisp            |  1 -
 3 files changed, 7 insertions(+), 9 deletions(-)


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




More information about the clfswm-cvs mailing list