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

pbrochard at common-lisp.net pbrochard at common-lisp.net
Sat Apr 5 21:23:15 UTC 2008


Author: pbrochard
Date: Sat Apr  5 16:23:14 2008
New Revision: 68

Modified:
   clfswm/ChangeLog
   clfswm/TODO
   clfswm/src/clfswm-nw-hooks.lisp
Log:
New nw-hook: Open the next window in the current frame and leave the focus to the current child.


Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog	(original)
+++ clfswm/ChangeLog	Sat Apr  5 16:23:14 2008
@@ -1,3 +1,9 @@
+2008-04-05  Philippe Brochard  <pbrochard at common-lisp.net>
+
+	* src/clfswm-nw-hooks.lisp (leave-focus-frame-nw-hook): New
+	nw-hook: Open the next window in the current frame and leave the
+	focus to the current child.
+
 2008-04-04  Philippe Brochard  <pbrochard at common-lisp.net>
 
 	* src/bindings-second-mode.lisp: Add keys definitions to

Modified: clfswm/TODO
==============================================================================
--- clfswm/TODO	(original)
+++ clfswm/TODO	Sat Apr  5 16:23:14 2008
@@ -7,9 +7,9 @@
 ===============
 Should handle these soon.
 
-Rewrote all useful code present in 0801 version.
-- Bind alt+1/2/3/4... to a particular child (current root and current child) [Philippe]
-  Open a menu: Space -> jump to child  Enter -> bind current child to key
+- Add a show-all-children without recomputation of geometry (ie: use real coordinates
+  and redisplay only the wanted child).  *** REALLY URGENT ***
+  Split computation of geometry outside of show-all-children. [Philippe]
 
 - Hook to open next window in named/numbered frame [Philippe]
 
@@ -35,10 +35,6 @@
 
 - A Gimp layout example [Philippe]
 
-- Add a show-all-children without recomputation of geometry (ie: use real coordinates
-  and redisplay only the wanted child).
-  Split computation of geometry outside of show-all-children. [Philippe]
-
 
 
 MAYBE

Modified: clfswm/src/clfswm-nw-hooks.lisp
==============================================================================
--- clfswm/src/clfswm-nw-hooks.lisp	(original)
+++ clfswm/src/clfswm-nw-hooks.lisp	Sat Apr  5 16:23:14 2008
@@ -129,3 +129,23 @@
   (set-nw-hook #'open-in-new-frame-in-root-frame-nw-hook))
 
 (register-nw-hook 'set-open-in-new-frame-in-root-frame-nw-hook)
+
+
+
+;;; Open a new window but leave the focus on the current child
+(defun leave-focus-frame-nw-hook (frame window)
+  "Open the next window in the current frame and leave the focus to the current child"
+  (declare (ignore frame))
+  (leave-if-not-frame *current-child*)
+  (when (frame-p *current-child*)
+    (pushnew window (frame-child *current-child*))
+    (when (second (frame-child *current-child*))
+      (rotatef (first (frame-child *current-child*))
+	       (second (frame-child *current-child*)))))
+  (default-window-placement *current-child* window))
+
+(defun set-leave-focus-frame-nw-hook ()
+  "Open the next window in the current frame and leave the focus to the current child"
+  (set-nw-hook #'leave-focus-frame-nw-hook))
+
+(register-nw-hook 'set-leave-focus-frame-nw-hook)



More information about the clfswm-cvs mailing list