Also remove frame in delete-child-and-children-in-all-frames
authorPhilippe Brochard <pbrochard@common-lisp.net>
Fri, 13 Dec 2013 21:51:57 +0000 (13 22:51 +0100)
committerPhilippe Brochard <pbrochard@common-lisp.net>
Fri, 13 Dec 2013 21:51:57 +0000 (13 22:51 +0100)
src/clfswm-internal.lisp
src/clfswm-util.lisp

index 01807cf..dc6f150 100644 (file)
@@ -1567,7 +1567,10 @@ Warning:frame window and gc are freeed."
     (when (frame-p child)
       (delete-child-and-children-in-frames child *root-frame* close-methode))
     (when (xlib:window-p child)
-      (funcall close-methode child))))
+      (funcall close-methode child))
+    (when (frame-p child)
+      (awhen (frame-gc child) (xlib:free-gcontext it) (setf it nil))
+      (awhen (frame-window child) (xlib:destroy-window it) (setf it nil)))))
 
 
 (defun clean-windows-in-all-frames ()
index 2acb2d3..f5cefac 100644 (file)
@@ -671,7 +671,7 @@ Write (defparameter *contrib-dir* \"/usr/local/lib/clfswm/\") in ~A.~%"
               (child-root-p frame))
     (when (child-equal-p frame (current-child))
       (setf (current-child) (find-current-root)))
-    (remove-child-in-frame frame (find-parent-frame frame)))
+    (delete-child-and-children-in-all-frames frame))
   (show-all-children t))