- while( g_list_first( window->Children ) != NULL )
- {
- SFG_Window* subWindow = g_list_first( window->Children )->data;
-
- /*
- * Destroy the first window in the list (possibly destroying
- * it's subwindows too. This is not very effective, but works
- */
- fgDestroyWindow( subWindow, TRUE );
-
- /*
- * Remove the just destroyed node from the subwindows list
- */
- window->Children = g_list_remove( window->Children, subWindow );
- }
-
- /*
- * Have the list freed now (probably it already is, but you can
- * never be sure with no GLib documentation on your hdd...)
- */
- g_list_free( window->Children );
- window->Children = NULL;