--- rxvt-unicode/src/rxvtfont.C 2011/07/29 09:41:22 1.182 +++ rxvt-unicode/src/rxvtfont.C 2012/06/10 13:07:56 1.191 @@ -24,7 +24,7 @@ #include "rxvtutil.h" #include "rxvtfont.h" -#include +#include #include @@ -242,7 +242,7 @@ Picture dst; # ifdef HAVE_BG_PIXMAP - if (term->bg_pixmap + if (term->bg_img && !term->pix_colors[color].is_opaque () && ((dst = XftDrawPicture (d)))) { @@ -818,10 +818,10 @@ // this loop only iterates when the guessed font-size is too small for (;;) { - font_weight *best = fonts + count - 1; + font_weight *best = fonts; - for (font_weight *w = fonts; w < best; w++) - if (w->diff <= best->diff) + for (font_weight *w = fonts + 1; w < fonts + count; w++) + if (w->diff < best->diff) best = w; if (!best->name @@ -1413,7 +1413,7 @@ #ifdef HAVE_BG_PIXMAP Picture dst = 0; // the only assignment is done conditionally in the following if condition - if (term->bg_pixmap + if (term->bg_img && (bg == Color_transparent || bg == Color_bg || (bg >= 0 && !term->pix_colors[bg].is_opaque () && ((dst = XftDrawPicture (d2)))))) { @@ -1425,10 +1425,10 @@ src_y += term->window_vt_y; } - if (term->bg_pmap_width >= src_x + w - && term->bg_pmap_height >= src_y + h) + if (term->bg_img->w >= src_x + w + && term->bg_img->h >= src_y + h) { - XCopyArea (disp, term->bg_pixmap, d2, gc, + XCopyArea (disp, term->bg_img->pm, d2, gc, src_x, src_y, w, h, 0, 0); } else @@ -1436,7 +1436,7 @@ XGCValues gcv; gcv.fill_style = FillTiled; - gcv.tile = term->bg_pixmap; + gcv.tile = term->bg_img->pm; gcv.ts_x_origin = -src_x; gcv.ts_y_origin = -src_y; @@ -1787,7 +1787,7 @@ if (!fmap[hi]) { - fmap[hi] = (pagemap *)new pagemap; + fmap[hi] = new pagemap; memset (fmap[hi], 0xff, sizeof (pagemap)); }