--- rxvt-unicode/src/rxvtperl.xs 2012/06/07 17:30:33 1.185 +++ rxvt-unicode/src/rxvtperl.xs 2012/06/07 18:07:42 1.186 @@ -2100,12 +2100,6 @@ { img = img->clone (); // own the img - { - rxvt_img *img2 = img->convert_format (XRenderFindVisualFormat (THIS->dpy, THIS->visual), THIS->pix_colors [Color_bg]); - delete img; - img = img2; - } - if (img->repeat != RepeatNormal) // X11 only supports RepeatNormal as bg pixmap { rxvt_img *img2 = img->sub_rect (0, 0, @@ -2121,6 +2115,12 @@ delete img; img = img2; } + + { + rxvt_img *img2 = img->convert_format (XRenderFindVisualFormat (THIS->dpy, THIS->visual), THIS->pix_colors [Color_bg]); + delete img; + img = img2; + } THIS->bg_pixmap = img->steal (); THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH | rxvt_term::BG_INHIBIT_RENDER;