summaryrefslogtreecommitdiff
path: root/render/instance.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/instance.c')
-rw-r--r--render/instance.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/render/instance.c b/render/instance.c
index 386c87a3..02e68040 100644
--- a/render/instance.c
+++ b/render/instance.c
@@ -57,6 +57,8 @@ void print_refs(gint id)
RrInstance* RrInstanceNew (Display *display, gint screen)
{
+ g_type_init(); /* supposedly needed for pango but seems to work without */
+
definst = g_new (RrInstance, 1);
definst->display = display;
definst->screen = screen;
@@ -64,6 +66,7 @@ RrInstance* RrInstanceNew (Display *display, gint screen)
definst->depth = DefaultDepth(display, screen);
definst->visual = DefaultVisual(display, screen);
definst->colormap = DefaultColormap(display, screen);
+ definst->pango = pango_xft_get_context(display, screen);
definst->pseudo_colors = NULL;
@@ -210,6 +213,7 @@ void RrInstanceFree (RrInstance *inst)
if (inst == definst) definst = NULL;
g_free(inst->pseudo_colors);
g_hash_table_destroy(inst->color_hash);
+ g_object_unref(inst->pango);
}
}