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

pbrochard at common-lisp.net pbrochard at common-lisp.net
Mon Apr 21 22:10:10 UTC 2008


Author: pbrochard
Date: Mon Apr 21 18:10:05 2008
New Revision: 80

Added:
   clfswm/src/clfswm-menu.lisp
Modified:
   clfswm/ChangeLog
   clfswm/TODO
   clfswm/clfswm.asd
   clfswm/src/bindings-second-mode.lisp
   clfswm/src/clfswm-info.lisp
   clfswm/src/clfswm-internal.lisp
   clfswm/src/clfswm-util.lisp
Log:
New menu system that let user change keys or functions associated to keys.


Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog	(original)
+++ clfswm/ChangeLog	Mon Apr 21 18:10:05 2008
@@ -1,3 +1,8 @@
+2008-04-22  Philippe Brochard  <pbrochard at common-lisp.net>
+
+	* src/clfswm-menu.lisp: New menu system that let user change keys
+	or functions associated to keys.
+
 2008-04-18  Philippe Brochard  <pbrochard at common-lisp.net>
 
 	* src/clfswm-internal.lisp (show-all-children): Display-child is

Modified: clfswm/TODO
==============================================================================
--- clfswm/TODO	(original)
+++ clfswm/TODO	Mon Apr 21 18:10:05 2008
@@ -7,8 +7,6 @@
 ===============
 Should handle these soon.
 
-- Rethink the menu system to be able to change/add/remove entry. [Philippe]
-
 - Add a frame parameter to choose what window type to handle. [Philippe]
 
 - Hook to open next window in named/numbered frame [Philippe]
@@ -19,22 +17,13 @@
 
 - Raise/lower frame - this can be done with children order [Philippe]
 
-- Hide/Unhide frame [Philippe]
-
-- Add boundaries in the info window [Philippe]
-
-- get-frame-by-name (path)  [Philippe]
-  get-frame-by-name (path): return the frame that its own frame has this name if it exists such a frame
-  get-window-by-name (path): return the window that its own frame that its own frame has this name if it exists such a window.
-
 - Adapt frame to window hints [Philippe]
 
 - Show config -> list and display documentation for all tweakable global variables. [Philippe]
 
-- Set Layout once [Philippe]
-
 - A Gimp layout example [Philippe]
 
+- Add boundaries in the info window [Philippe]
 
 
 MAYBE
@@ -64,3 +53,4 @@
 
 - cd/pwd a la shell to navigate throu frames. [Philippe] 
 
+- Hide/Unhide frame [Philippe]

Modified: clfswm/clfswm.asd
==============================================================================
--- clfswm/clfswm.asd	(original)
+++ clfswm/clfswm.asd	Mon Apr 21 18:10:05 2008
@@ -48,10 +48,12 @@
 			  :depends-on ("clfswm" "clfswm-util" "clfswm-second-mode"))
 			 (:file "clfswm-nw-hooks"
 			  :depends-on ("package" "clfswm-util" "clfswm-info"))
+			 (:file "clfswm-menu"
+			  :depends-on ("package" "clfswm-info"))
 			 (:file "bindings"
 			  :depends-on ("clfswm" "clfswm-internal" "clfswm-util"))
 			 (:file "bindings-second-mode"
-			  :depends-on ("clfswm" "clfswm-util" "clfswm-query" "bindings" "clfswm-pack"))))))
+			  :depends-on ("clfswm" "clfswm-util" "clfswm-query" "bindings" "clfswm-pack" "clfswm-menu"))))))
 
 
 

Modified: clfswm/src/bindings-second-mode.lisp
==============================================================================
--- clfswm/src/bindings-second-mode.lisp	(original)
+++ clfswm/src/bindings-second-mode.lisp	Mon Apr 21 18:10:05 2008
@@ -34,74 +34,39 @@
 ;;;`-----
 
 
+(define-second-key ("F1" :mod-1) 'help-on-second-mode)
 
-;;;;;;;;;;;;;;;
-;; Menu entry
-;;;;;;;;;;;;;;;
-(defun frame-adding-menu ()
-  "Adding frame menu"
-  (info-mode-menu '((#\a add-default-frame)
-		    (#\p add-placed-frame))))
+;;;;;;;;;;;;;;;;;
+;;;; Menu entry
+;;;;;;;;;;;;;;;;;
 
-(defun frame-layout-menu ()
-  "Frame layout menu"
-  (info-mode-menu (keys-from-list *layout-list*)))
+;;; Here is a small example of menu manipulation:
 
-(defun frame-layout-once-menu ()
-  "Frame layout menu (Set only once)"
-  (info-mode-menu (keys-from-list (loop :for l :in *layout-list*
-				     :collect (create-symbol (format nil "~A" l) "-ONCE")))))
+;;(add-menu-key 'main "a" 'help-on-second-mode)
+;;(add-menu-key 'main "c" 'help-on-clfswm)
+;;
+;;(add-sub-menu 'main "p" 'plop "A sub menu")
+;;
+;;(add-menu-key 'plop "a" 'help-on-clfswm)
+;;(add-menu-key 'plop "b" 'help-on-second-mode)
+;;(add-menu-key 'plop "d" 'help-on-second-mode)
 
-(defun frame-nw-hook-menu ()
-  "Frame new window hook menu"
-  (info-mode-menu (keys-from-list *nw-hook-list*)))
 
+;;(del-menu-key 'main "p")
+;;(del-menu-value 'plop 'help-on-main-mode)
+;;(del-sub-menu 'main 'plop)
+
+;;(define-second-key ("a") 'open-menu)
 
-  
 
-(defun frame-pack-menu ()
-  "Frame pack menu"
-  (info-mode-menu '(("Up" current-frame-pack-up)
-		    ("Down" current-frame-pack-down)
-		    ("Left" current-frame-pack-left)
-		    ("Right" current-frame-pack-right))))
-
-
-(defun frame-fill-menu ()
-  "Frame fill menu"
-  (info-mode-menu '(("Up" current-frame-fill-up)
-		    ("Down" current-frame-fill-down)
-		    ("Left" current-frame-fill-left)
-		    ("Right" current-frame-fill-right)
-		    (#\a current-frame-fill-all-dir)
-		    (#\v current-frame-fill-vertical)
-		    (#\h current-frame-fill-horizontal))))
-
-(defun frame-resize-menu ()
-  "Frame resize menu"
-  (info-mode-menu '(("Up" current-frame-resize-up)
-		    ("Down" current-frame-resize-down)
-		    ("Left" current-frame-resize-left)
-		    ("Right" current-frame-resize-right)
-		    (#\d current-frame-resize-all-dir)
-		    (#\a current-frame-resize-all-dir-minimal))))
-
-
-(defun frame-movement-menu ()
-  "Frame movement menu"
-  (info-mode-menu '((#\p frame-pack-menu)
-		    (#\f frame-fill-menu)
-		    (#\r frame-resize-menu)
-		    (#\c center-current-frame)))
-  (leave-second-mode))
 
 
 (defmacro with-movement (&body body)
   `(when (frame-p *current-child*)
      , at body
-     (show-all-children) ;; PLOP
+     (show-all-children)
      (draw-second-mode-window)
-     (frame-movement-menu)))
+     (open-menu (find-menu 'frame-movement-menu))))
 
 
 ;;; Pack
@@ -195,87 +160,127 @@
 
 
 
+(defun frame-layout-menu ()
+  "< Frame layout menu >"
+  (info-mode-menu (keys-from-list *layout-list*)))
+
+(defun frame-layout-once-menu ()
+  "< Frame layout menu (Set only once) >"
+  (info-mode-menu (keys-from-list (loop :for l :in *layout-list*
+				     :collect (create-symbol (format nil "~A" l) "-ONCE")))))
+
+(defun frame-nw-hook-menu ()
+  "< Frame new window hook menu >"
+  (info-mode-menu (keys-from-list *nw-hook-list*)))
 
 
 
-(defun action-by-name-menu ()
-  "Actions by name menu"
-  (info-mode-menu '((#\f focus-frame-by-name)
-		    (#\o open-frame-by-name)
-		    (#\d delete-frame-by-name)
-		    (#\m move-current-child-by-name)
-		    (#\c copy-current-child-by-name))))
-
-(defun action-by-number-menu ()
-  "Actions by number menu"
-  (info-mode-menu '((#\f focus-frame-by-number)
-		    (#\o open-frame-by-number)
-		    (#\d delete-frame-by-number)
-		    (#\m move-current-child-by-number)
-		    (#\c copy-current-child-by-number))))
-
-
-(defun frame-info-menu ()
-  "Frame information menu"
-  (info-mode-menu '((#\s show-all-frames-info)
-		    (#\h hide-all-frames-info))))
-
-
-(defun frame-menu ()
-  "Frame menu"
-  (info-mode-menu '((#\a frame-adding-menu)
-		    (#\l frame-layout-menu)
-		    (#\o frame-layout-once-menu)
-		    (#\n frame-nw-hook-menu)
-		    (#\m frame-movement-menu)
-		    (#\r rename-current-child)
-		    (#\u renumber-current-frame)
-		    (#\i frame-info-menu)
-		    (#\x explode-current-frame))))
-
-(defun window-menu ()
-  "Window menu"
-  (info-mode-menu '((#\i force-window-in-frame)
-		    (#\c force-window-center-in-frame))))
-
-
-
-(defun selection-menu ()
-  "Selection menu"
-  (info-mode-menu '((#\x cut-current-child)
-		    (#\c copy-current-child)
-		    (#\v paste-selection)
-		    (#\p paste-selection-no-clear)
-		    ("Delete" remove-current-child)
-		    (#\z clear-selection))))
-
-
-(defun utility-menu ()
-  "Utility menu"
-  (info-mode-menu '((#\i identify-key)
-		    ("colon" eval-from-query-string)
-		    ("exclam" run-program-from-query-string))))
-  
-(defun main-menu ()
-  "Open the main menu"
-  (info-mode-menu '((#\f frame-menu)
-		    (#\w window-menu)
-		    (#\s selection-menu)
-		    (#\n action-by-name-menu)
-		    (#\u action-by-number-menu)
-		    (#\y utility-menu))))
+(add-sub-menu 'main "f" 'frame-menu "Frame menu")
+(add-sub-menu 'main "w" 'window-menu "Window menu")
+(add-sub-menu 'main "s" 'selection-menu "Selection menu")
+(add-sub-menu 'main "n" 'action-by-name-menu "Action by name menu")
+(add-sub-menu 'main "u" 'action-by-number-menu "Action by number menu")
+(add-sub-menu 'main "y" 'utility-menu "Utility menu")
 
 
 
+(add-sub-menu 'frame-menu "a" 'frame-adding-menu "Adding frame menu")
+(add-menu-key 'frame-menu "l" 'frame-layout-menu)
+(add-menu-key 'frame-menu "o" 'frame-layout-once-menu)
+(add-menu-key 'frame-menu "n" 'frame-nw-hook-menu)
+(add-sub-menu 'frame-menu "m" 'frame-movement-menu "Frame movement menu")
+(add-sub-menu 'frame-menu "i" 'frame-info-menu "Frame info menu")
+(add-menu-key 'frame-menu "r" 'rename-current-child)
+(add-menu-key 'frame-menu "u" 'renumber-current-frame)
+(add-menu-key 'frame-menu "x" 'explode-current-frame)
 
 
+(add-menu-key 'frame-adding-menu "a" 'add-default-frame)
+(add-menu-key 'frame-adding-menu "p" 'add-placed-frame)
 
-(define-second-key ("F1" :mod-1) 'help-on-second-mode)
 
-(define-second-key ("m") 'main-menu)
-(define-second-key ("f") 'frame-menu)
-(define-second-key ("n") 'action-by-name-menu)
-(define-second-key ("u") 'action-by-number-menu)
+(add-sub-menu 'frame-movement-menu "p" 'frame-pack-menu "Frame pack menu")
+(add-sub-menu 'frame-movement-menu "f" 'frame-fill-menu "Frame fill menu")
+(add-sub-menu 'frame-movement-menu "r" 'frame-resize-menu "Frame resize menu")
+(add-menu-key 'frame-movement-menu "c" 'center-current-frame)
+
+
+(add-menu-key 'frame-pack-menu "Up" 'current-frame-pack-up)
+(add-menu-key 'frame-pack-menu "Down" 'current-frame-pack-down)
+(add-menu-key 'frame-pack-menu "Left" 'current-frame-pack-left)
+(add-menu-key 'frame-pack-menu "Right" 'current-frame-pack-right)
+
+
+(add-menu-key 'frame-fill-menu "Up" 'current-frame-fill-up)
+(add-menu-key 'frame-fill-menu "Down" 'current-frame-fill-down)
+(add-menu-key 'frame-fill-menu "Left" 'current-frame-fill-left)
+(add-menu-key 'frame-fill-menu "Right" 'current-frame-fill-right)
+(add-menu-key 'frame-fill-menu #\a 'current-frame-fill-all-dir)
+(add-menu-key 'frame-fill-menu #\v 'current-frame-fill-vertical)
+(add-menu-key 'frame-fill-menu #\h 'current-frame-fill-horizontal)
+
+(add-menu-key 'frame-resize-menu "Up" 'current-frame-resize-up)
+(add-menu-key 'frame-resize-menu "Down" 'current-frame-resize-down)
+(add-menu-key 'frame-resize-menu "Left" 'current-frame-resize-left)
+(add-menu-key 'frame-resize-menu "Right" 'current-frame-resize-right)
+(add-menu-key 'frame-resize-menu #\d 'current-frame-resize-all-dir)
+(add-menu-key 'frame-resize-menu #\a 'current-frame-resize-all-dir-minimal)
+
+
+(add-menu-key 'frame-info-menu "s" 'show-all-frames-info)
+(add-menu-key 'frame-info-menu "h" 'hide-all-frames-info)
+
+
+(add-menu-key 'window-menu "i" 'force-window-in-frame)
+(add-menu-key 'window-menu "c" 'force-window-center-in-frame)
+
+
+(add-menu-key 'selection-menu "x" 'cut-current-child)
+(add-menu-key 'selection-menu "c" 'copy-current-child)
+(add-menu-key 'selection-menu "v" 'paste-selection)
+(add-menu-key 'selection-menu "p" 'paste-selection-no-clear)
+(add-menu-key 'selection-menu "Delete" 'remove-current-child)
+(add-menu-key 'selection-menu "z" 'clear-selection)
+
+
+
+(add-menu-key 'action-by-name-menu "f" 'focus-frame-by-name)
+(add-menu-key 'action-by-name-menu "o" 'open-frame-by-name)
+(add-menu-key 'action-by-name-menu "d" 'delete-frame-by-name)
+(add-menu-key 'action-by-name-menu "m" 'move-current-child-by-name)
+(add-menu-key 'action-by-name-menu "c" 'copy-current-child-by-name)
+
+(add-menu-key 'action-by-number-menu "f" 'focus-frame-by-number)
+(add-menu-key 'action-by-number-menu "o" 'open-frame-by-number)
+(add-menu-key 'action-by-number-menu "d" 'delete-frame-by-number)
+(add-menu-key 'action-by-number-menu "m" 'move-current-child-by-number)
+(add-menu-key 'action-by-number-menu "c" 'copy-current-child-by-number)
+
+
+(add-menu-key 'utility-menu "i" 'identify-key)
+(add-menu-key 'utility-menu "colon" 'eval-from-query-string)
+(add-menu-key 'utility-menu "exclam" 'run-program-from-query-string)
+
+
+
+
+(defun open-frame-menu ()
+  "Open the frame menu"
+  (open-menu (find-menu 'frame-menu)))
+
+(defun open-action-by-name-menu ()
+  "Open the action by name menu"
+  (open-menu (find-menu 'action-by-name-menu)))
+
+(defun open-action-by-number-menu ()
+  "Open the action by number menu"
+  (open-menu (find-menu 'action-by-number-menu)))
+
+
+(define-second-key ("m") 'open-menu)
+(define-second-key ("f") 'open-frame-menu)
+(define-second-key ("n") 'open-action-by-name-menu)
+(define-second-key ("u") 'open-action-by-number-menu)
 
 
 ;;(define-second-key (#\g :control) 'stop-all-pending-actions)
@@ -389,11 +394,6 @@
 
 
 
-
-
-
-
-
 ;;; Mouse action
 (defun sm-mouse-click-to-focus-and-move (window root-x root-y)
   "Move and focus the current child - Create a new frame on the root window"

Modified: clfswm/src/clfswm-info.lisp
==============================================================================
--- clfswm/src/clfswm-info.lisp	(original)
+++ clfswm/src/clfswm-info.lisp	Mon Apr 21 18:10:05 2008
@@ -431,7 +431,7 @@
 
 
 (defun help-on-second-mode ()
-  "Open the help and info window"
+  "Open the help and info window for the second mode"
   (info-mode-menu '((#\h show-global-key-binding)
 		    (#\b show-second-mode-key-binding)
 		    (#\t show-date)

Modified: clfswm/src/clfswm-internal.lisp
==============================================================================
--- clfswm/src/clfswm-internal.lisp	(original)
+++ clfswm/src/clfswm-internal.lisp	Mon Apr 21 18:10:05 2008
@@ -587,7 +587,7 @@
 	  (setf *current-child* (first child)))))
     (when frame-is-root?
       (setf *current-root* *current-child*))
-    (show-all-children *current-root*))) ;; PLOP
+    (show-all-children *current-root*)))
 
 
 (defun select-next-brother ()
@@ -623,7 +623,7 @@
     (unselect-all-frames)
     (with-slots (child) *current-child*
       (setf child (funcall fun-rotate child)))
-    (show-all-children))) ;; PLOP
+    (show-all-children)))
 
 
 (defun select-next-child ()
@@ -640,7 +640,7 @@
   "Enter in the selected frame - ie make it the root frame"
   (hide-all *current-root*)
   (setf *current-root* *current-child*)
-  (show-all-children *current-root*)) ;; PLOP
+  (show-all-children *current-root*))
 
 (defun leave-frame ()
   "Leave the selected frame - ie make its father the root frame"
@@ -648,7 +648,7 @@
   (awhen (find-father-frame *current-root*)
 	 (when (frame-p it)
 	   (setf *current-root* it)))
-  (show-all-children *current-root*)) ;; PLOP
+  (show-all-children *current-root*))
 
 
 (defun switch-to-root-frame (&key (show-later nil))
@@ -656,7 +656,7 @@
   (hide-all *current-root*)
   (setf *current-root* *root-frame*)
   (unless show-later
-    (show-all-children *current-root*))) ;; PLOP
+    (show-all-children *current-root*)))
 
 (defun switch-and-select-root-frame (&key (show-later nil))
   "Switch and select the root frame"
@@ -664,14 +664,14 @@
   (setf *current-root* *root-frame*)
   (setf *current-child* *current-root*)
   (unless show-later
-    (show-all-children *current-root*))) ;; PLOP
+    (show-all-children *current-root*)))
 
 
 (defun toggle-show-root-frame ()
   "Show/Hide the root frame"
   (hide-all *current-root*)
   (setf *show-root-frame-p* (not *show-root-frame-p*))
-  (show-all-children *current-root*)) ;; PLOP
+  (show-all-children *current-root*))
 
 
 (defun remove-child-in-frame (child frame)

Added: clfswm/src/clfswm-menu.lisp
==============================================================================
--- (empty file)
+++ clfswm/src/clfswm-menu.lisp	Mon Apr 21 18:10:05 2008
@@ -0,0 +1,129 @@
+;;; --------------------------------------------------------------------------
+;;; CLFSWM - FullScreen Window Manager
+;;;
+;;; --------------------------------------------------------------------------
+;;; Documentation: Menu functions
+;;; --------------------------------------------------------------------------
+;;;
+;;; (C) 2005 Philippe Brochard <hocwp at free.fr>
+;;;
+;;; This program is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or
+;;; (at your option) any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with this program; if not, write to the Free Software
+;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+;;;
+;;; --------------------------------------------------------------------------
+
+(in-package :clfswm)
+
+
+(defstruct menu name item doc)
+(defstruct menu-item key value)
+
+
+(defvar *menu* (make-menu :name 'main))
+
+
+(defmacro with-all-menu ((menu item) &body body)
+  (let ((rec (gensym))
+	(subm (gensym)))
+    `(labels ((,rec (,item)
+		, at body
+		(when (menu-p ,item)
+		  (dolist (,subm (menu-item ,item))
+		    (,rec ,subm)))
+		(when (and (menu-item-p ,item) (menu-p (menu-item-value ,item)))
+		  (,rec (menu-item-value ,item)))))
+       (,rec ,menu))))
+
+(defun add-item (item &optional (menu *menu*))
+  (setf (menu-item menu) (nconc (menu-item menu) (list item))))
+
+(defun del-item (item &optional (menu *menu*))
+  (setf (menu-item menu) (remove item (menu-item menu))))
+
+
+
+;;; Finding functions
+(defun find-menu (name  &optional (root *menu*))
+  (with-all-menu (root item)
+    (when (and (menu-p item)
+	       (equal name (menu-name item)))
+	(return-from find-menu item))))
+
+
+(defun find-item-by-key (key &optional (root *menu*))
+  (with-all-menu (root item)
+    (when (and (menu-item-p item)
+	       (equal (menu-item-key item) key))
+      (return-from find-item-by-key item))))
+
+(defun find-item-by-value (value &optional (root *menu*))
+  (with-all-menu (root item)
+    (when (and (menu-item-p item)
+	       (equal (menu-item-value item) value))
+      (return-from find-item-by-value item))))
+
+
+(defun del-item-by-key (key &optional (menu *menu*))
+  (del-item (find-item-by-key key menu) menu))
+
+(defun del-item-by-value (value &optional (menu *menu*))
+  (del-item (find-item-by-value value menu) menu))
+
+
+
+;;; Convenient functions
+(defun add-menu-key (menu-name key value)
+  (add-item (make-menu-item :key key :value value) (find-menu menu-name)))
+
+(defun add-sub-menu (menu-name key sub-menu-name &optional (doc "Sub menu"))
+  (add-item (make-menu-item :key key :value (make-menu :name sub-menu-name :doc doc)) (find-menu menu-name)))
+
+
+(defun del-menu-key (menu-name key)
+  (del-item-by-key key (find-menu menu-name)))
+
+(defun del-menu-value (menu-name value)
+  (del-item-by-value value (find-menu menu-name)))
+
+(defun del-sub-menu (menu-name sub-menu-name)
+  (del-item-by-value (find-menu sub-menu-name) (find-menu menu-name)))
+
+
+
+
+;;; Display menu functions
+(defun open-menu (&optional (menu *menu*))
+  "Open the main menu"
+  (let ((info-list nil)
+	(action nil))
+    (dolist (item (menu-item menu))
+      (let ((value (menu-item-value item)))
+	(push (format nil "~A: ~A" (menu-item-key item) (typecase value
+							  (menu (format nil "< ~A >" (menu-doc value)))
+							  (t (documentation value 'function))))
+	      info-list)
+	(define-info-key-fun (list (menu-item-key item) 0)
+	    (lambda (&optional args)
+	      (declare (ignore args))
+	      (setf action value)
+	      (throw 'exit-info-loop nil)))))
+    (info-mode (nreverse info-list))
+    (dolist (item (menu-item menu))
+      (undefine-info-key-fun (list (menu-item-key item) 0)))
+    (typecase action
+      (menu (open-menu action))
+      (t (when (fboundp action)
+	   (funcall action))))))
+
+      
\ No newline at end of file

Modified: clfswm/src/clfswm-util.lisp
==============================================================================
--- clfswm/src/clfswm-util.lisp	(original)
+++ clfswm/src/clfswm-util.lisp	Mon Apr 21 18:10:05 2008
@@ -336,7 +336,8 @@
     (hide-all *current-root*)
     (focus-all-children frame (or (find-father-frame frame *current-root*)
 				(find-father-frame frame)
-				*root-frame*))))
+				*root-frame*))
+    (show-all-children *current-root*)))
 
 
 (defun focus-frame-by-name ()
@@ -353,7 +354,8 @@
 ;;; Open by functions
 (defun open-frame-by (frame)
   (when (frame-p frame)
-    (push (create-frame :name (query-string "Frame name")) (frame-child frame))))
+    (push (create-frame :name (query-string "Frame name")) (frame-child frame))
+    (show-all-children *current-root*)))
 
 
 
@@ -364,7 +366,7 @@
 
 (defun open-frame-by-number ()
   "Open a new frame in a numbered frame"
-  (open-frame-by (find-frame-by-name (ask-frame-name "Open a new frame in the grou numbered:")))
+  (open-frame-by (find-frame-by-number (query-number "Open a new frame in the group numbered:")))
   (leave-second-mode))
 
 
@@ -376,7 +378,8 @@
       (setf *current-root* *root-frame*))
     (when (equal frame *current-child*)
       (setf *current-child* *current-root*))
-    (remove-child-in-frame frame (find-father-frame frame))))
+    (remove-child-in-frame frame (find-father-frame frame)))
+  (show-all-children *current-root*))
 
 
 (defun delete-frame-by-name ()
@@ -396,7 +399,8 @@
     (hide-all *current-root*)
     (remove-child-in-frame child (find-father-frame child))
     (pushnew child (frame-child frame-dest))
-    (focus-all-children child frame-dest)))
+    (focus-all-children child frame-dest)
+    (show-all-children *current-root*)))
 
 (defun move-current-child-by-name ()
   "Move current child in a named frame"
@@ -418,7 +422,8 @@
   (when (and child (frame-p frame-dest))
     (hide-all *current-root*)
     (pushnew child (frame-child frame-dest))
-    (focus-all-children child frame-dest)))
+    (focus-all-children child frame-dest)
+    (show-all-children *current-root*)))
 
 (defun copy-current-child-by-name ()
   "Copy current child in a named frame"
@@ -591,7 +596,7 @@
 	(when child
 	  (funcall mouse-fn child father root-x root-y)))
       (when (and child father (focus-all-children child father))
-	(when (show-all-children) ;; PLOP
+	(when (show-all-children)
 	  (setf to-replay nil))))
     (if to-replay
 	(replay-button-event)
@@ -714,7 +719,7 @@
     (setf *current-root* (aref key-slots current-slot)
 	  *current-child* *current-root*)
     (focus-all-children *current-child* *current-child*)
-    (show-all-children *current-root*)) ;; PLOP
+    (show-all-children *current-root*))
   
   (defun bind-or-jump (n)
     "Bind or jump to a slot"



More information about the clfswm-cvs mailing list