… | |
… | |
2098 | |
2098 | |
2099 | if (img) // TODO: cannot be false |
2099 | if (img) // TODO: cannot be false |
2100 | { |
2100 | { |
2101 | img = img->clone (); // own the img |
2101 | img = img->clone (); // own the img |
2102 | |
2102 | |
2103 | { |
|
|
2104 | rxvt_img *img2 = img->convert_format (XRenderFindVisualFormat (THIS->dpy, THIS->visual), THIS->pix_colors [Color_bg]); |
|
|
2105 | delete img; |
|
|
2106 | img = img2; |
|
|
2107 | } |
|
|
2108 | |
|
|
2109 | if (img->repeat != RepeatNormal) // X11 only supports RepeatNormal as bg pixmap |
2103 | if (img->repeat != RepeatNormal) // X11 only supports RepeatNormal as bg pixmap |
2110 | { |
|
|
2111 | rxvt_img *img2 = img->sub_rect (0, 0, |
2104 | img->sub_rect (0, 0, |
2112 | border ? THIS->vt_width : THIS->szHint.width, |
2105 | border ? THIS->vt_width : THIS->szHint.width, |
2113 | border ? THIS->vt_height : THIS->szHint.height); |
2106 | border ? THIS->vt_height : THIS->szHint.height) |
2114 | delete img; |
2107 | ->replace (img); |
2115 | img = img2; |
|
|
2116 | } |
|
|
2117 | |
2108 | |
2118 | { |
|
|
2119 | // just in case, should usually be a nop |
2109 | // just in case, should usually be a nop |
2120 | rxvt_img *img2 = img->reify (); |
2110 | img->reify () |
2121 | delete img; |
2111 | ->replace (img); |
2122 | img = img2; |
2112 | |
2123 | } |
2113 | img->convert_format (XRenderFindVisualFormat (THIS->dpy, THIS->visual), THIS->pix_colors [Color_bg]) |
|
|
2114 | ->replace (img); |
2124 | |
2115 | |
2125 | THIS->bg_pixmap = img->steal (); |
2116 | THIS->bg_pixmap = img->steal (); |
2126 | THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH | rxvt_term::BG_INHIBIT_RENDER; |
2117 | THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH | rxvt_term::BG_INHIBIT_RENDER; |
2127 | |
2118 | |
2128 | if (!border) |
2119 | if (!border) |