[clfswm-cvs] r307 - in clfswm: . src
Philippe Brochard
pbrochard at common-lisp.net
Sun Aug 29 12:01:06 UTC 2010
Author: pbrochard
Date: Sun Aug 29 08:01:04 2010
New Revision: 307
Log:
hide-current-child: Prevent from removing the current root.
Modified:
clfswm/ChangeLog
clfswm/src/clfswm-util.lisp
Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog (original)
+++ clfswm/ChangeLog Sun Aug 29 08:01:04 2010
@@ -1,5 +1,8 @@
2010-08-29 Philippe Brochard <pbrochard at common-lisp.net>
+ * src/clfswm-util.lisp (hide-current-child): Prevent from removing
+ the current root.
+
* src/clfswm-internal.lisp (child-member): New predicate.
(child-remove): New function.
Modified: clfswm/src/clfswm-util.lisp
==============================================================================
--- clfswm/src/clfswm-util.lisp (original)
+++ clfswm/src/clfswm-util.lisp Sun Aug 29 08:01:04 2010
@@ -1033,15 +1033,16 @@
;;; Hide/Unhide current child
(defun hide-current-child ()
"Hide the current child"
- (let ((parent (find-parent-frame *current-child*)))
- (when (frame-p parent)
- (with-slots (child hidden-children) parent
- (hide-all *current-child*)
- (setf child (child-remove *current-child* child))
- (pushnew *current-child* hidden-children)
- (setf *current-child* parent))
- (show-all-children)))
- (leave-second-mode))
+ (unless (child-equal-p *current-child* *current-root*)
+ (let ((parent (find-parent-frame *current-child*)))
+ (when (frame-p parent)
+ (with-slots (child hidden-children) parent
+ (hide-all *current-child*)
+ (setf child (child-remove *current-child* child))
+ (pushnew *current-child* hidden-children)
+ (setf *current-child* parent))
+ (show-all-children)))
+ (leave-second-mode)))
(defun frame-unhide-child (hidden frame-src frame-dest)
More information about the clfswm-cvs
mailing list