l->xftdraw = XftDrawCreate(ob_display, l->pixmap,
render_visual, render_colormap);
}
- font_draw(l->xftdraw, &l->texture[i].data.text);
+ font_draw(l->xftdraw, &l->texture[i].data.text, x, y, w, h);
break;
case Bitmask:
if (l->texture[i].data.mask.color->gc == None)
out->textures = numtex;
out->xftdraw = NULL;
if (numtex) out->texture = g_new(Texture, numtex);
+ else out->texture = NULL;
out->pixmap = None;
switch (type) {
break;
}
copy->textures = orig->textures;
- if (orig->textures) {
- copy->texture = malloc(orig->textures * sizeof(Texture));
- memcpy(copy->texture, orig->texture, orig->textures * sizeof(Texture));
- } else copy->texture = NULL;
+ copy->texture = g_memdup(orig->texture, orig->textures * sizeof(Texture));
copy->pixmap = None;
copy->xftdraw = NULL;
return copy;
if (p->primary != NULL) color_free(p->primary);
if (p->secondary != NULL) color_free(p->secondary);
if (p->border_color != NULL) color_free(p->border_color);
+ if (p->pixel_data != NULL) g_free(p->pixel_data);
}
g_free(a);
}