X-Git-Url: https://git.stderr.nl/gitweb?p=rodin%2Fchimara.git;a=blobdiff_plain;f=libchimara%2Fchimara-glk.c;h=4f1d39102dd9db62754eb4ecc30a6bfe5a8f3b6c;hp=8d1e65583c707a5d0d13c206f334d4b42223645f;hb=65f88142d8843d16c203efad8830fbebba888f0f;hpb=3d647bf217282e6706887b8e0e1d0d0f884f0da0 diff --git a/libchimara/chimara-glk.c b/libchimara/chimara-glk.c index 8d1e655..4f1d391 100644 --- a/libchimara/chimara-glk.c +++ b/libchimara/chimara-glk.c @@ -107,6 +107,9 @@ chimara_glk_init(ChimaraGlk *self) priv->ignore_next_arrange_event = FALSE; priv->char_input_queue = g_async_queue_new(); priv->line_input_queue = g_async_queue_new(); + priv->resource_lock = g_mutex_new(); + priv->resource_loaded = g_cond_new(); + priv->resource_info_available = g_cond_new(); /* Should be g_async_queue_new_full(g_free); but only in GTK >= 2.16 */ priv->interrupt_handler = NULL; priv->root_window = NULL; @@ -215,6 +218,11 @@ chimara_glk_finalize(GObject *object) g_mutex_unlock(priv->arrange_lock); g_mutex_free(priv->arrange_lock); priv->arrange_lock = NULL; + g_mutex_lock(priv->resource_lock); + g_cond_free(priv->resource_loaded); + g_cond_free(priv->resource_info_available); + g_mutex_unlock(priv->resource_lock); + g_mutex_free(priv->resource_lock); /* Unref input queues (this should destroy them since any Glk thread has stopped by now */ g_async_queue_unref(priv->char_input_queue); g_async_queue_unref(priv->line_input_queue);