Commit 3c7721db authored by Philippe Brochard's avatar Philippe Brochard
Browse files

Rename bury-frame to bury-current-child. Add a bury first child function

parent 37f7f93d
......@@ -482,20 +482,28 @@ Write (defparameter *contrib-dir* \"/usr/local/lib/clfswm/\") in ~A.~%"
;;; Bury function
(defun bury-frame ()
"Bury the current frame: put the current frame at the end of the parent frame children list"
(defun bury-first-child ()
"Bury the first child: put the first child at the end of the current frame children list"
(let ((current-child (current-child)))
(when (frame-p current-child)
(let ((parent (find-parent-frame current-child))
(is-root-p (child-root-p current-child)))
(when is-root-p
(leave-frame))
(setf (frame-child parent) (append (child-remove current-child (frame-child parent)) (list current-child))
(current-child) (first (frame-child parent)))
(if is-root-p
(enter-frame)
(show-all-children t))
(leave-second-mode)))))
(let ((first-child (first (frame-child current-child))))
(setf (frame-child current-child) (append (child-remove first-child (frame-child current-child)) (list first-child))))
(show-all-children t)
(leave-second-mode))))
(defun bury-current-child ()
"Bury the current child: put the current child at the end of the parent frame children list"
(let* ((current-child (current-child))
(parent (find-parent-frame current-child))
(is-root-p (child-root-p current-child)))
(when is-root-p
(leave-frame))
(setf (frame-child parent) (append (child-remove current-child (frame-child parent)) (list current-child))
(current-child) (first (frame-child parent)))
(if is-root-p
(enter-frame)
(show-all-children t))
(leave-second-mode)))
......
......@@ -81,8 +81,10 @@
(add-menu-key 'child-menu "r" 'rename-current-child)
(add-menu-key 'child-menu "b" 'bury-current-child)
(add-menu-key 'child-menu "f" 'bury-first-child)
(add-menu-key 'child-menu "t" 'set-current-child-transparency)
(add-menu-key 'child-menu "b" 'set-current-child-border-size)
(add-menu-key 'child-menu "o" 'set-current-child-border-size)
(add-menu-key 'child-menu "e" 'ensure-unique-name)
(add-menu-key 'child-menu "n" 'ensure-unique-number)
(add-menu-key 'child-menu "Delete" 'delete-current-child)
......@@ -90,7 +92,7 @@
(add-menu-key 'child-menu "R" 'retrieve-existing-window)
(add-menu-key 'child-menu "h" 'hide-current-child)
(add-menu-key 'child-menu "u" 'unhide-a-child)
(add-menu-key 'child-menu "f" 'unhide-a-child-from-all-frames)
(add-menu-key 'child-menu "F" 'unhide-a-child-from-all-frames)
(add-menu-key 'child-menu "a" 'unhide-all-children)
(add-menu-key 'child-menu "Page_Up" 'frame-lower-child)
(add-menu-key 'child-menu "Page_Down" 'frame-raise-child)
......@@ -111,7 +113,6 @@
(add-sub-menu 'frame-menu "w" 'frame-managed-window-menu "Managed window type menu")
(add-sub-menu 'frame-menu "u" 'frame-unmanaged-window-menu "Unmanaged window behaviour")
(add-sub-menu 'frame-menu "s" 'frame-miscellaneous-menu "Frame miscallenous menu")
(add-menu-key 'frame-menu "b" 'bury-frame)
(add-menu-key 'frame-menu "x" 'frame-toggle-maximize)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment