hack so text shows up
This commit is contained in:
parent
3232247b0c
commit
cce970813f
1 changed files with 17 additions and 12 deletions
|
@ -81,18 +81,11 @@ void x_paint(Window win, Appearance *l, int w, int h)
|
||||||
if (l->surface.data.planar.grad == Background_Solid)
|
if (l->surface.data.planar.grad == Background_Solid)
|
||||||
gradient_solid(l, w, h);
|
gradient_solid(l, w, h);
|
||||||
else gradient_render(&l->surface, w, h);
|
else gradient_render(&l->surface, w, h);
|
||||||
for (i = 0; i < l->textures; i++) {
|
|
||||||
switch (l->texture[i].type) {
|
/*reduce depth here...
|
||||||
case Text:
|
also, this is not the right place for this code, it's only here so
|
||||||
if (l->xftdraw == NULL) {
|
text rendering shows up for now.
|
||||||
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) {
|
if (l->surface.data.planar.grad != Background_Solid) {
|
||||||
im = XCreateImage(ob_display, render_visual, render_depth,
|
im = XCreateImage(ob_display, render_visual, render_depth,
|
||||||
ZPixmap, 0, NULL, w, h, 32, 0);
|
ZPixmap, 0, NULL, w, h, 32, 0);
|
||||||
|
@ -104,6 +97,18 @@ void x_paint(Window win, Appearance *l, int w, int h)
|
||||||
im->data = NULL;
|
im->data = NULL;
|
||||||
XDestroyImage(im);
|
XDestroyImage(im);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < l->textures; i++) {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
XSetWindowBackgroundPixmap(ob_display, win, l->pixmap);
|
XSetWindowBackgroundPixmap(ob_display, win, l->pixmap);
|
||||||
XClearWindow(ob_display, win);
|
XClearWindow(ob_display, win);
|
||||||
if (oldp != None) XFreePixmap(ob_display, oldp);
|
if (oldp != None) XFreePixmap(ob_display, oldp);
|
||||||
|
|
Loading…
Reference in a new issue