… | |
… | |
54 | typedef char * octet_string; |
54 | typedef char * octet_string; |
55 | typedef char * utf8_string; |
55 | typedef char * utf8_string; |
56 | |
56 | |
57 | typedef int render_repeat_mode; |
57 | typedef int render_repeat_mode; |
58 | |
58 | |
|
|
59 | #if HAVE_PIXBUF |
59 | typedef GdkPixbuf * urxvt__pixbuf; |
60 | typedef GdkPixbuf * urxvt__pixbuf; |
|
|
61 | #endif |
60 | typedef rxvt_img * urxvt__img; |
62 | typedef rxvt_img * urxvt__img; |
61 | |
63 | |
62 | ///////////////////////////////////////////////////////////////////////////// |
64 | ///////////////////////////////////////////////////////////////////////////// |
63 | |
65 | |
64 | static void |
66 | static void |
… | |
… | |
2099 | if (img) // TODO: cannot be false |
2101 | if (img) // TODO: cannot be false |
2100 | { |
2102 | { |
2101 | img = img->clone (); // own the img |
2103 | img = img->clone (); // own the img |
2102 | |
2104 | |
2103 | if (img->repeat != RepeatNormal) // X11 only supports RepeatNormal as bg pixmap |
2105 | if (img->repeat != RepeatNormal) // X11 only supports RepeatNormal as bg pixmap |
2104 | { |
|
|
2105 | rxvt_img *img2 = img->sub_rect (0, 0, |
2106 | img->sub_rect (0, 0, |
2106 | border ? THIS->vt_width : THIS->szHint.width, |
2107 | border ? THIS->vt_width : THIS->szHint.width, |
2107 | border ? THIS->vt_height : THIS->szHint.height); |
2108 | border ? THIS->vt_height : THIS->szHint.height) |
2108 | delete img; |
2109 | ->replace (img); |
2109 | img = img2; |
|
|
2110 | } |
|
|
2111 | |
2110 | |
2112 | { |
|
|
2113 | rxvt_img *img2 = img->convert_format (XRenderFindVisualFormat (THIS->dpy, THIS->visual), THIS->pix_colors [Color_bg]); |
|
|
2114 | delete img; |
|
|
2115 | img = img2; |
|
|
2116 | } |
|
|
2117 | |
|
|
2118 | { |
|
|
2119 | // just in case, should usually be a nop |
2111 | // just in case, should usually be a nop |
2120 | rxvt_img *img2 = img->reify (); |
2112 | img->reify () |
2121 | delete img; |
2113 | ->replace (img); |
2122 | img = img2; |
2114 | |
2123 | } |
2115 | img->convert_format (XRenderFindVisualFormat (THIS->dpy, THIS->visual), THIS->pix_colors [Color_bg]) |
|
|
2116 | ->replace (img); |
2124 | |
2117 | |
2125 | THIS->bg_pixmap = img->steal (); |
2118 | THIS->bg_pixmap = img->steal (); |
2126 | THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH | rxvt_term::BG_INHIBIT_RENDER; |
2119 | THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH | rxvt_term::BG_INHIBIT_RENDER; |
2127 | |
2120 | |
2128 | if (!border) |
2121 | if (!border) |