]> Dogcows Code - chaz/openbox/blobdiff - render/font.c
couple more xrdb theme format cleanups:
[chaz/openbox] / render / font.c
index d2a4acaeed31e0b8177d4903489d136a3b913581..a099c0930812a01bffb2b0be794a817a6f2e43cc 100644 (file)
@@ -7,6 +7,7 @@
 #include <X11/Xft/Xft.h>
 #include <glib.h>
 #include <string.h>
+#include <stdlib.h>
 
 #define ELIPSES "..."
 #define ELIPSES_LENGTH(font) \
@@ -132,7 +133,7 @@ int RrFontMeasureString(const RrFont *f, const gchar *str)
 {
     gint x, y;
     font_measure_full (f, str, &x, &y);
-    return x;
+    return x + 4;
 }
 
 int RrFontHeight(const RrFont *f)
@@ -225,5 +226,7 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area)
     XftDrawStringUtf8(d, &c, t->font->xftfont, x,
                       t->font->xftfont->ascent + y,
                       (FcChar8*)text->str, l);
+
+    g_string_free(text, TRUE);
     return;
 }
This page took 0.024755 seconds and 4 git commands to generate.