[clfswm-cvs] r134 - clfswm/src

pbrochard at common-lisp.net pbrochard at common-lisp.net
Thu May 22 13:39:19 UTC 2008


Author: pbrochard
Date: Thu May 22 09:39:19 2008
New Revision: 134

Modified:
   clfswm/src/clfswm-internal.lisp
Log:
remove-child-in-frame: better algorithm to remove window and gc frame

Modified: clfswm/src/clfswm-internal.lisp
==============================================================================
--- clfswm/src/clfswm-internal.lisp	(original)
+++ clfswm/src/clfswm-internal.lisp	Thu May 22 09:39:19 2008
@@ -736,12 +736,10 @@
   "Remove the child in frame"
   (when (frame-p frame)
     (setf (frame-child frame) (remove child (frame-child frame) :test #'equal))
-    (let ((frame-windows nil))
-      (with-all-frames (child f)
-	(pushnew (frame-window f) frame-windows))
-      (dolist (win frame-windows)
-	(unless (find-frame-window win)
-	  (xlib:destroy-window win))))))
+    (with-all-frames (child fr)
+      (unless (find-frame-window (frame-window fr))
+	(awhen (frame-gc fr) (xlib:free-gcontext it) (setf it nil))
+	(awhen (frame-window fr) (xlib:destroy-window it) (setf it nil))))))
 
 (defun remove-child-in-frames (child root)
   "Remove child in the frame root and in all its children"



More information about the clfswm-cvs mailing list