X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=render%2Frender.c;h=31d522c4edab9e81f9e050d6d33d72f906a10d41;hb=9a3459e983a11d74ec9f5dc415ce0af551c4b74e;hp=ac5e00235c171e7274c91e4f98c7221f75fc1784;hpb=3232247b0c36cf1b5b5e11c8cb03c8e0c457abdd;p=chaz%2Fopenbox diff --git a/render/render.c b/render/render.c index ac5e0023..31d522c4 100644 --- a/render/render.c +++ b/render/render.c @@ -4,6 +4,7 @@ #include "render.h" #include "gradient.h" #include "font.h" +#include "mask.h" #include "../kernel/openbox.h" int render_depth; @@ -81,18 +82,11 @@ void x_paint(Window win, Appearance *l, int w, int h) if (l->surface.data.planar.grad == Background_Solid) gradient_solid(l, w, h); else gradient_render(&l->surface, w, h); - 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; - } - } -//reduce depth + +/*reduce depth here... + also, this is not the right place for this code, it's only here so + text rendering shows up for now. +*/ if (l->surface.data.planar.grad != Background_Solid) { im = XCreateImage(ob_display, render_visual, render_depth, ZPixmap, 0, NULL, w, h, 32, 0); @@ -104,6 +98,23 @@ void x_paint(Window win, Appearance *l, int w, int h) im->data = NULL; 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; + case Bitmask: + if (l->texture[i].data.mask.color->gc == None) + color_allocate_gc(l->texture[i].data.mask.color); + mask_draw(l->pixmap, &l->texture[i].data.mask, w, h); + break; + } + } XSetWindowBackgroundPixmap(ob_display, win, l->pixmap); XClearWindow(ob_display, win); if (oldp != None) XFreePixmap(ob_display, oldp);