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

Philippe Brochard pbrochard at common-lisp.net
Fri Nov 5 20:46:30 UTC 2010


Author: pbrochard
Date: Fri Nov  5 16:46:29 2010
New Revision: 374

Log:
src/clfswm-internal.lisp (frame-select-next-child, frame-select-previous-child): New functions and bindings. Select the next/previous child in the current frame.

Modified:
   clfswm/ChangeLog
   clfswm/src/bindings.lisp
   clfswm/src/clfswm-internal.lisp

Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog	(original)
+++ clfswm/ChangeLog	Fri Nov  5 16:46:29 2010
@@ -1,3 +1,9 @@
+2010-11-05  Philippe Brochard  <pbrochard at common-lisp.net>
+
+	* src/clfswm-internal.lisp (frame-select-next-child)
+	(frame-select-previous-child): New functions and bindings. Select
+	the next/previous child in the current frame.
+
 2010-10-31  Philippe Brochard  <pbrochard at common-lisp.net>
 
 	* src/clfswm-query.lisp (query-mode-complet): New function: Handle

Modified: clfswm/src/bindings.lisp
==============================================================================
--- clfswm/src/bindings.lisp	(original)
+++ clfswm/src/bindings.lisp	Fri Nov  5 16:46:29 2010
@@ -54,8 +54,10 @@
   (define-main-key ("Return" :mod-1) 'enter-frame)
   (define-main-key ("Return" :mod-1 :shift) 'leave-frame)
   (define-main-key ("Return" :mod-5) 'frame-toggle-maximize)
-  (define-main-key ("Page_Up" :mod-1) 'frame-lower-child)
-  (define-main-key ("Page_Down" :mod-1) 'frame-raise-child)
+  (define-main-key ("Page_Up" :mod-1) 'frame-select-previous-child)
+  (define-main-key ("Page_Down" :mod-1) 'frame-select-next-child)
+  (define-main-key ("Page_Up" :mod-1 :control) 'frame-lower-child)
+  (define-main-key ("Page_Down" :mod-1 :control) 'frame-raise-child)
   (define-main-key ("Home" :mod-1) 'switch-to-root-frame)
   (define-main-key ("Home" :mod-1 :shift) 'switch-and-select-root-frame)
   (define-main-key ("F10" :mod-1) 'fast-layout-switch)

Modified: clfswm/src/clfswm-internal.lisp
==============================================================================
--- clfswm/src/clfswm-internal.lisp	(original)
+++ clfswm/src/clfswm-internal.lisp	Fri Nov  5 16:46:29 2010
@@ -869,6 +869,25 @@
     (show-all-children)))
 
 
+(defun frame-select-next-child ()
+  "Select the next child in the current frame"
+  (when (frame-p *current-child*)
+    (with-slots (child selected-pos) *current-child*
+      (unless (>= selected-pos (length child))
+	(incf selected-pos)))
+    (show-all-children)))
+
+
+(defun frame-select-previous-child ()
+  "Select the previous child in the current frame"
+  (when (frame-p *current-child*)
+    (with-slots (child selected-pos) *current-child*
+      (unless (< selected-pos 1)
+	(decf selected-pos)))
+    (show-all-children)))
+
+
+
 (defun switch-to-root-frame (&key (show-later nil))
   "Switch to the root frame"
   (hide-all *current-root*)




More information about the clfswm-cvs mailing list