1
0
Fork 0

(svn r13099) -Fix [FS#2014]: when a window had children only one of them would be closed (on a parent closure) instead of all children.

release/0.7
rubidium 2008-05-15 11:17:56 +00:00
parent 15e89b32b9
commit 009a748ab3
1 changed files with 6 additions and 2 deletions

View File

@ -626,8 +626,12 @@ Window::~Window()
memmove(wz, wz + 1, (byte*)_last_z_window - (byte*)wz);
_last_z_window--;
/* Delete any children a window might have in a head-recursive manner */
delete FindChildWindow(this);
/* Delete all children a window might have in a head-recursive manner */
Window *child = FindChildWindow(this);
while (child != NULL) {
delete child;
child = FindChildWindow(this);
}
WindowEvent e;
e.event = WE_DESTROY;