X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=render%2Finstance.c;h=a9b70ffe47987942b1c9cb787576b4ef7f4f7363;hb=d20f84f5ded581c57df5904c6fa550dac05ad036;hp=386c87a3e5d7477356607c0b1524d659960cacd6;hpb=d9f14c1d010860e658f4a9adc6682e0264b410aa;p=chaz%2Fopenbox diff --git a/render/instance.c b/render/instance.c index 386c87a3..a9b70ffe 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,8 @@ 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); + g_free(inst); } }