Commit 37f7f93d authored by Philippe Brochard's avatar Philippe Brochard
Browse files

Add a bury frame function

parent a06c2687
......@@ -481,6 +481,23 @@ 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"
(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)))))
;;; Maximize function
(defun frame-toggle-maximize ()
......
......@@ -111,6 +111,7 @@
(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