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

Philippe Brochard pbrochard at common-lisp.net
Sat May 7 08:02:36 UTC 2011


Author: pbrochard
Date: Sat May  7 04:02:35 2011
New Revision: 456

Log:
src/clfswm-layout.lisp (update-layout-managed-children-position): New function.

Modified:
   clfswm/ChangeLog
   clfswm/src/bindings-second-mode.lisp
   clfswm/src/clfswm-layout.lisp

Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog	(original)
+++ clfswm/ChangeLog	Sat May  7 04:02:35 2011
@@ -1,3 +1,8 @@
+2011-05-07  Philippe Brochard  <pbrochard at common-lisp.net>
+
+	* src/clfswm-layout.lisp (update-layout-managed-children-position):
+	New function.
+
 2011-05-06  Philippe Brochard  <pbrochard at common-lisp.net>
 
 	* src/bindings-second-mode.lisp (set-default-second-keys):

Modified: clfswm/src/bindings-second-mode.lisp
==============================================================================
--- clfswm/src/bindings-second-mode.lisp	(original)
+++ clfswm/src/bindings-second-mode.lisp	Sat May  7 04:02:35 2011
@@ -92,6 +92,7 @@
   (define-second-key ("p") 'open-frame-pack-menu)
   (define-second-key ("l") 'open-frame-fill-menu)
   (define-second-key ("r") 'open-frame-resize-menu)
+  (define-second-key ("x") 'update-layout-managed-children-position)
   ;;(define-second-key (#\g :control) 'stop-all-pending-actions)
   (define-second-key ("i") 'identify-key)
   (define-second-key ("colon") 'eval-from-query-string)

Modified: clfswm/src/clfswm-layout.lisp
==============================================================================
--- clfswm/src/clfswm-layout.lisp	(original)
+++ clfswm/src/clfswm-layout.lisp	Sat May  7 04:02:35 2011
@@ -191,11 +191,23 @@
 	(remove-frame-data-slot *current-child* :tile-layout-keep-position))))
 
 
-(defun set-layout-managed-children ()
-  (when (frame-p *current-child*)
-    (setf (frame-data-slot *current-child* :layout-managed-children)
-	  (copy-list (get-managed-child *current-child*)))
-    (tile-layout-ask-keep-position)))
+
+(labels ((set-managed ()
+           (setf (frame-data-slot *current-child* :layout-managed-children)
+                 (copy-list (get-managed-child *current-child*)))))
+  (defun set-layout-managed-children ()
+    (when (frame-p *current-child*)
+      (set-managed)
+      (tile-layout-ask-keep-position)))
+
+
+  (defun update-layout-managed-children-position ()
+    "Update layout managed children position"
+    (when (frame-p *current-child*)
+      (set-managed)
+      (leave-second-mode))))
+
+
 
 (defun update-layout-managed-children-keep-position (child parent)
   (let ((managed-children (frame-data-slot parent :layout-managed-children))




More information about the clfswm-cvs mailing list