-
- /* Unref input queues */
- g_async_queue_unref(priv->char_input_queue);
- g_async_queue_unref(priv->line_input_queue);
-
- /* Free styles */
- pango_font_description_free(priv->default_font_desc);
- pango_font_description_free(priv->monospace_font_desc);
-
- g_free(priv->current_dir);
- g_hash_table_destroy(priv->default_styles->text_buffer);
- g_hash_table_destroy(priv->default_styles->text_grid);
- g_hash_table_destroy(priv->current_styles->text_buffer);
- g_hash_table_destroy(priv->current_styles->text_grid);
-}
-
-/* Internal function: main thread version of destroy_windows_below, only more
- DESTRUCTO-MATIC! */
-static void
-trash_windows_recursive(ChimaraGlkPrivate *priv, winid_t win)
-{
- switch(win->type)
- {
- case wintype_Blank:
- case wintype_TextGrid:
- case wintype_TextBuffer:
- gtk_widget_unparent(win->frame);
- break;
-
- case wintype_Pair:
- trash_windows_recursive(priv, win->window_node->children->data);
- trash_windows_recursive(priv, win->window_node->children->next->data);
- break;
-
- default:
- ILLEGAL_PARAM("Unknown window type: %u", win->type);
- return;
- }
- trash_stream_thread_independent(priv, win->window_stream);
- trash_window_thread_independent(priv, win);
-}
-
-void
-_chimara_glk_free_window_private_data(ChimaraGlkPrivate *priv)
-{
- /* Destroy the window tree */
- trash_windows_recursive(priv, priv->root_window->data);
- g_node_destroy(priv->root_window);
-
+ /* Free the shutdown keypress signaling mechanism */
+ g_mutex_lock(priv->shutdown_lock);
+ g_cond_free(priv->shutdown_key_pressed);
+ g_mutex_unlock(priv->shutdown_lock);
+ priv->shutdown_lock = NULL;