]> Dogcows Code - chaz/openbox/commitdiff
try to render fonts
authorDerek Foreman <manmower@gmail.com>
Sun, 16 Mar 2003 23:36:17 +0000 (23:36 +0000)
committerDerek Foreman <manmower@gmail.com>
Sun, 16 Mar 2003 23:36:17 +0000 (23:36 +0000)
destroy pixmaps and xftdraws in appearance_delete

render/render.c

index cdbf01f57bd074db39551d812b3da2440af77e57..63b55d5c60ac6b767e2941a99b41727fa31db197 100644 (file)
@@ -80,7 +80,15 @@ void x_paint(Window win, Appearance *l, int w, int h)
         gradient_solid(l, w, h);
     else gradient_render(&l->surface, w, h);
     for (i = 0; i < l->textures; i++) {
-        printf("I AM DOING SOMETHING NOW\n");
+        switch (l->texture[i].type) {
+        case Text:
+            if (l->xftdraw == NULL) {
+                l->xftdraw = XftDrawCreate(ob_display, l->pixmap, 
+                                        render_visual, render_colormap);
+            }
+            font_draw(l->xftdraw, l->texture[i].data.text);
+        break;
+        }
     }
 //reduce depth
     if (l->surface.data.planar.grad != Background_Solid) {
@@ -178,6 +186,8 @@ Appearance *appearance_copy(Appearance *orig)
 void appearance_free(Appearance *a)
 {
     PlanarSurface *p;
+    if (a->pixmap != None) XFreePixmap(ob_display, a->pixmap);
+    if (a->xftdraw != NULL) XftDrawDestroy(a->xftdraw);
     if (a->textures)
         g_free(a->texture);
     if (a->surface.type == Surface_Planar) {
This page took 0.07764 seconds and 4 git commands to generate.