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

Philippe Brochard pbrochard at common-lisp.net
Thu Feb 19 23:38:10 UTC 2015


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  a83e36e68f26a8c4ca04939362507fe31e5772db (commit)
      from  8fb65ba011b2d50b8b3c5fd4462116dc6269c7a8 (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 a83e36e68f26a8c4ca04939362507fe31e5772db
Author: Philippe Brochard <pbrochard at common-lisp.net>
Date:   Fri Feb 20 00:39:46 2015 +0100

    Add an expose mode to present child without changing there position

diff --git a/src/bindings.lisp b/src/bindings.lisp
index 80348aa..a9f4530 100644
--- a/src/bindings.lisp
+++ b/src/bindings.lisp
@@ -76,6 +76,7 @@
   (define-main-key ("Home" :mod-1 :shift) 'switch-and-select-root-frame)
   (define-main-key ("Menu") 'fastswitch-mode)
   (define-main-key ("Menu" :control) 'fastswitch-move-mode)
+  (define-main-key ("Menu" :mod-5) 'expose-current-child-mode)
   (define-main-key ("F10" :mod-1) 'fast-layout-switch)
   (define-main-key ("F10" :shift :control) 'toggle-show-root-frame)
   (define-main-key ("F10") 'expose-windows-mode)
@@ -156,5 +157,3 @@
   (define-main-mouse (5 :mod-1 :control :shift) 'inc-transparency-slow))
 
 (add-hook *binding-hook* 'set-default-main-mouse)
-
-
diff --git a/src/clfswm-expose-mode.lisp b/src/clfswm-expose-mode.lisp
index 8ea964d..2515ee9 100644
--- a/src/clfswm-expose-mode.lisp
+++ b/src/clfswm-expose-mode.lisp
@@ -170,16 +170,18 @@
               (frame-data-slot child :old-layout) nil)))))
 
 (defun expose-mode-display-accel-windows ()
-  (with-all-root-child (root)
-    (with-all-children-reversed (root child)
-      (let ((ex-child (find child *expose-child-list* :test #'child-equal-p :key #'expose-child-child)))
-        (when ex-child
-          (if (or (frame-p (expose-child-child ex-child))
-                  (managed-window-p (expose-child-child ex-child)
-                                    (find-parent-frame (expose-child-child ex-child) *root-frame*)))
-              (expose-create-window ex-child)
-              (hide-child (expose-child-child ex-child)))))))
-  (expose-draw-letter))
+  (let ((all-hidden-windows (get-hidden-windows)))
+	(with-all-root-child (root)
+	  (with-all-children-reversed (root child)
+		(let ((ex-child (find child *expose-child-list* :test #'child-equal-p :key #'expose-child-child)))
+		  (when ex-child
+			(if (or (frame-p (expose-child-child ex-child))
+					(managed-window-p (expose-child-child ex-child)
+									  (find-parent-frame (expose-child-child ex-child) *root-frame*)))
+				(unless (child-member (expose-child-child ex-child) all-hidden-windows)
+				  (expose-create-window ex-child))
+				(hide-child (expose-child-child ex-child)))))))
+	(expose-draw-letter)))
 
 
 (defun expose-find-child-from-letters (letters)
@@ -196,7 +198,7 @@
           (expose-child-child ex-child))))))
 
 
-(defun expose-restore-windows ()
+(defun expose-restore-windows (&optional (present-window t))
   (remove-hook *query-key-press-hook* 'expose-query-key-press-hook)
   (remove-hook *query-button-press-hook* 'expose-query-button-press-hook)
   (dolist (ex-child *expose-child-list*)
@@ -208,7 +210,8 @@
           (expose-child-window ex-child) nil))
   (when *expose-font*
     (xlib:close-font *expose-font*))
-  (expose-unpresent-windows))
+  (when present-window
+	(expose-unpresent-windows)))
 
 (defun expose-focus-child (child)
   (let ((parent (typecase child
@@ -219,13 +222,14 @@
       (setf (current-child) child)
       (focus-all-children child parent t))))
 
-(defun expose-do-main ()
+(defun expose-do-main (&optional (present-window t))
   (stop-button-event)
   (expose-init)
-  (expose-present-windows)
+  (when present-window
+	(expose-present-windows))
   (expose-mode-display-accel-windows)
   (let ((child (expose-select-child)))
-    (expose-restore-windows)
+	(expose-restore-windows present-window)
     child))
 
 (defun expose-windows-mode ()
@@ -247,3 +251,10 @@
       (expose-focus-child child)))
   (show-all-children)
   t)
+
+(defun expose-current-child-mode ()
+  "Present all windows in currents roots (An expose like)"
+  (awhen (expose-do-main nil)
+    (expose-focus-child it))
+  (show-all-children)
+  t)
diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp
index edc3c2b..bf5d596 100644
--- a/src/clfswm-internal.lisp
+++ b/src/clfswm-internal.lisp
@@ -1826,7 +1826,3 @@ managed."
     (print-frame-tree (dump-frame-tree store #'xid->window)
                       #'(lambda (x)
                           (format nil "~A" (if (frame-p x) x (child-fullname x)))))))
-
-
-
-

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

Summary of changes:
 src/bindings.lisp           |  3 +--
 src/clfswm-expose-mode.lisp | 41 ++++++++++++++++++++++++++---------------
 src/clfswm-internal.lisp    |  4 ----
 3 files changed, 27 insertions(+), 21 deletions(-)


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




More information about the clfswm-cvs mailing list