diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-03-03 02:53:41 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-03-03 02:53:41 +0000 |
| commit | 037fc862b0dd4535accf7b69a8c0112355bd04b1 (patch) | |
| tree | 768c502ef4cd3fb826d2d9466eac672fd614688a /render/instance.c | |
| parent | c5b551b25a1d89a3f20599adeec6c6c6a31946e5 (diff) | |
pango is now mandatory..
lots of cleanups to the pango code, which was a very nice base to start from. thanks to whomever wrote that for us.. put some of the pango variables into the various render structs so that they don't need to be created all the time. put the pango context inside our RrInstance so that it can be properly freed at shutdown. removed xft dependencies all through the code and the build system also. who knows if this will break compiling for some poor souls. i guess we'll find out, won't we!
Diffstat (limited to 'render/instance.c')
| -rw-r--r-- | render/instance.c | 4 |
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); } } |
