From pbrochard at common-lisp.net Tue Nov 4 22:20:24 2014 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Tue, 04 Nov 2014 22:20:24 +0000 Subject: [Clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-63-g7c63375 Message-ID: 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 7c63375c46e4eede7ae29dca007094ef55992f18 (commit) from e5a29ab7c25843747c4b7fed8e56907e36b0c4ff (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 7c63375c46e4eede7ae29dca007094ef55992f18 Author: Philippe Brochard Date: Tue Nov 4 23:20:58 2014 +0100 Handle correctly multi letters child in expose mode diff --git a/src/clfswm-expose-mode.lisp b/src/clfswm-expose-mode.lisp index 7a8726f..acb0e62 100644 --- a/src/clfswm-expose-mode.lisp +++ b/src/clfswm-expose-mode.lisp @@ -127,8 +127,11 @@ (defun expose-query-key-press-hook (code state) (declare (ignore code state)) (expose-draw-letter) - (when (and *expose-direct-select* (<= (length *expose-child-list*) 26)) - (leave-query-mode :return))) + (let ((two-letters-key (dolist (child *expose-child-list*) + (when (> (length (expose-child-key child)) 1) + (return t))))) + (when (and *expose-direct-select* (not two-letters-key)) + (leave-query-mode :return)))) (defun expose-query-button-press-hook (code state x y) (declare (ignore state)) ----------------------------------------------------------------------- Summary of changes: src/clfswm-expose-mode.lisp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Wed Nov 5 23:45:12 2014 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Wed, 05 Nov 2014 23:45:12 +0000 Subject: [Clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-64-g8fb65ba Message-ID: 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 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