--- rxvt-unicode/src/rxvtfont.C 2012/01/26 13:07:22 1.187 +++ rxvt-unicode/src/rxvtfont.C 2012/06/10 13:07:56 1.191 @@ -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)))) { @@ -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; @@ -1501,7 +1501,7 @@ (*i)->unref (); for (pagemap **p = fmap.begin (); p != fmap.end (); p++) - delete [] *p; + delete *p; free (fontdesc); fontdesc = 0; @@ -1787,14 +1787,7 @@ if (!fmap[hi]) { - // we use [1] here because C has no separate new and new [] forms, - // and pagemap is char[256], so new incorrectly assumes we want to - // allocate an array of chars instead of a single pagemap. - // we can either cast the resulting pointer to (pagemap *) or - // allocate an array of pagemaps, returning a pointer to the first member - // this is no extra overhead, as new even allocates an array for - // "new pagemap" - fmap[hi] = new pagemap[1]; + fmap[hi] = new pagemap; memset (fmap[hi], 0xff, sizeof (pagemap)); }