[clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-5-g216af7b

Philippe Brochard pbrochard at common-lisp.net
Thu Jun 16 20:51:50 UTC 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CLFSWM - A(nother) Common Lisp FullScreen Window Manager".

The branch, master has been updated
       via  216af7bfc32b8bfc577ccbd2ae07c04c6029bd80 (commit)
      from  71685aab8f287c08403eb221126b63b2e0133a47 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 216af7bfc32b8bfc577ccbd2ae07c04c6029bd80
Author: Philippe Brochard <pbrochard at common-lisp.net>
Date:   Thu Jun 16 22:52:10 2011 +0200

    src/clfswm-internal.lisp (clean-windows-in-all-frames): Prevent current root and current child being equal to child.

diff --git a/ChangeLog b/ChangeLog
index 655414e..cac88ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-16  Philippe Brochard  <pbrochard at common-lisp.net>
+
+	* src/clfswm-internal.lisp (clean-windows-in-all-frames): Prevent
+	current root and current child being equal to child.
+
 2011-06-13  Philippe Brochard  <pbrochard at common-lisp.net>
 
 	* src/keysyms.lisp: Repeat Page_Down/Up keysym definitions at the
diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp
index a331406..744c8e6 100644
--- a/src/clfswm-internal.lisp
+++ b/src/clfswm-internal.lisp
@@ -1117,6 +1117,15 @@ For window: set current child to window or its parent according to window-parent
   (show-all-children))
 
 
+
+(defun prevent-current-*-equal-child (child)
+  " Prevent current-root and current-child equal to child"
+  (when (child-equal-p child *current-root*)
+    (setf *current-root* (find-parent-frame child)))
+  (when (child-equal-p child *current-child*)
+    (setf *current-child* *current-root*)))
+
+
 (defun remove-child-in-frame (child frame)
   "Remove the child in frame"
   (when (frame-p frame)
@@ -1130,10 +1139,7 @@ For window: set current child to window or its parent according to window-parent
 
 (defun remove-child-in-all-frames (child)
   "Remove child in all frames from *root-frame*"
-  (when (child-equal-p child *current-root*)
-    (setf *current-root* (find-parent-frame child)))
-  (when (child-equal-p child *current-child*)
-    (setf *current-child* *current-root*))
+  (prevent-current-*-equal-child child)
   (remove-child-in-frames child *root-frame*))
 
 
@@ -1151,10 +1157,7 @@ Warning:frame window and gc are freeed."
 
 (defun delete-child-in-all-frames (child)
   "Delete child in all frames from *root-frame*"
-  (when (child-equal-p child *current-root*)
-    (setf *current-root* (find-parent-frame child)))
-  (when (child-equal-p child *current-child*)
-    (setf *current-child* *current-root*))
+  (prevent-current-*-equal-child child)
   (delete-child-in-frames child *root-frame*))
 
 (defun delete-child-and-children-in-frames (child root)
@@ -1167,10 +1170,7 @@ Warning:frame window and gc are freeed."
 
 (defun delete-child-and-children-in-all-frames (child &optional (close-methode 'delete-window))
   "Delete child and its children in all frames from *root-frame*"
-  (when (child-equal-p child *current-root*)
-    (setf *current-root* (find-parent-frame child)))
-  (when (child-equal-p child *current-child*)
-    (setf *current-child* *current-root*))
+  (prevent-current-*-equal-child child)
   (delete-child-and-children-in-frames child *root-frame*)
   (when (xlib:window-p child)
     (funcall close-methode child))
@@ -1184,6 +1184,7 @@ Warning:frame window and gc are freeed."
       (dolist (child (frame-child frame))
         (when (xlib:window-p child)
           (unless (member child x-tree :test #'xlib:window-equal)
+            (prevent-current-*-equal-child child)
             (setf (frame-child frame)
                   (child-remove child (frame-child frame)))))))))
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                |    5 +++++
 src/clfswm-internal.lisp |   25 +++++++++++++------------
 2 files changed, 18 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
CLFSWM - A(nother) Common Lisp FullScreen Window Manager




More information about the clfswm-cvs mailing list