[clfswm-cvs] r444 - in clfswm: . src

Philippe Brochard pbrochard at common-lisp.net
Thu Apr 14 19:47:37 UTC 2011


Author: pbrochard
Date: Thu Apr 14 15:47:37 2011
New Revision: 444

Log:
src/clfswm-util.lisp (with-movement-select-next-brother, with-movement-select-previous-brother, with-movement-select-next-child): Use a simple method (do not enter in the circulate mode) to allow to circulate in all children or brothers.

Modified:
   clfswm/ChangeLog
   clfswm/src/clfswm-circulate-mode.lisp
   clfswm/src/clfswm-util.lisp

Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog	(original)
+++ clfswm/ChangeLog	Thu Apr 14 15:47:37 2011
@@ -1,5 +1,11 @@
 2011-04-14  Philippe Brochard  <pbrochard at common-lisp.net>
 
+	* src/clfswm-util.lisp (with-movement-select-next-brother)
+	(with-movement-select-previous-brother)
+	(with-movement-select-next-child): Use a simple method (do not
+	enter in the circulate mode) to allow to circulate in all children
+	or brothers.
+
 	* src/clfswm-menu.lisp (open-menu): Save info hash table keys
 	instead of deleting newly created keys.
 

Modified: clfswm/src/clfswm-circulate-mode.lisp
==============================================================================
--- clfswm/src/clfswm-circulate-mode.lisp	(original)
+++ clfswm/src/clfswm-circulate-mode.lisp	Thu Apr 14 15:47:37 2011
@@ -276,3 +276,33 @@
     (setf *circulate-orig* (frame-child *current-child*)
 	  *circulate-parent* nil)
     (circulate-mode :subchild-direction +1)))
+
+
+(defun select-next-child-simple ()
+  "Select the next child (do not enter in circulate mode)"
+  (when (frame-p *current-child*)
+    (with-slots (child) *current-child*
+      (setf child (rotate-list child)))
+    (show-all-children)))
+
+
+
+(defun reorder-brother-simple (reorder-fun)
+  (unless (child-equal-p *current-child* *current-root*)
+    (no-focus)
+    (select-current-frame nil)
+    (let ((parent-frame (find-parent-frame *current-child*)))
+      (when (frame-p parent-frame)
+        (with-slots (child) parent-frame
+          (setf child (funcall reorder-fun child)
+                *current-child* (frame-selected-child parent-frame))))
+      (show-all-children t))))
+
+
+(defun select-next-brother-simple ()
+  "Select the next brother frame (do not enter in circulate mode)"
+  (reorder-brother-simple #'rotate-list))
+
+(defun select-previous-brother-simple ()
+  "Select the previous brother frame (do not enter in circulate mode)"
+  (reorder-brother-simple #'anti-rotate-list))

Modified: clfswm/src/clfswm-util.lisp
==============================================================================
--- clfswm/src/clfswm-util.lisp	(original)
+++ clfswm/src/clfswm-util.lisp	Thu Apr 14 15:47:37 2011
@@ -856,11 +856,11 @@
 ;;; Children navigation
 (defun with-movement-select-next-brother ()
   "Select the next brother frame"
-  (with-movement (select-next-brother)))
+  (with-movement (select-next-brother-simple)))
 
 (defun with-movement-select-previous-brother ()
   "Select the previous brother frame"
-  (with-movement (select-previous-brother)))
+  (with-movement (select-previous-brother-simple)))
 
 (defun with-movement-select-next-level ()
   "Select the next level"
@@ -872,7 +872,7 @@
 
 (defun with-movement-select-next-child ()
   "Select the next child"
-  (with-movement (select-next-child)))
+  (with-movement (select-next-child-simple)))
 
 
 




More information about the clfswm-cvs mailing list