… | |
… | |
237 | XClearArea (disp, d, x, y, w, h, false); |
237 | XClearArea (disp, d, x, y, w, h, false); |
238 | else if (color >= 0) |
238 | else if (color >= 0) |
239 | { |
239 | { |
240 | #if XFT |
240 | #if XFT |
241 | bool done = false; |
241 | bool done = false; |
|
|
242 | |
242 | #ifdef HAVE_BG_PIXMAP |
243 | # ifdef HAVE_BG_PIXMAP |
243 | if (term->bgPixmap.pixmap && color >= 0 && term->pix_colors[color].c.color.alpha < 0x0ff00) |
244 | if (term->bgPixmap.pixmap && color >= 0 && !term->pix_colors[color].is_opaque ()) |
244 | { |
245 | { |
245 | Picture dst = XftDrawPicture (d); |
246 | Picture dst = XftDrawPicture (d); |
|
|
247 | |
246 | if (dst != 0) |
248 | if (dst != 0) |
247 | { |
249 | { |
248 | XClearArea (disp, d, x, y, w, h, false); |
250 | XClearArea (disp, d, x, y, w, h, false); |
249 | Picture solid_color_pict = XftDrawSrcPicture (d, &term->pix_colors[color].c); |
251 | Picture solid_color_pict = XftDrawSrcPicture (d, &term->pix_colors[color].c); |
250 | XRenderComposite (disp, PictOpOver, solid_color_pict, None, dst, 0, 0, 0, 0, x, y, w, h); |
252 | XRenderComposite (disp, PictOpOver, solid_color_pict, None, dst, 0, 0, 0, 0, x, y, w, h); |
251 | done = true; |
253 | done = true; |
252 | } |
254 | } |
253 | } |
255 | } |
254 | #endif |
256 | # endif |
255 | if (!done) |
257 | if (!done) |
256 | XftDrawRect (d, &term->pix_colors[color].c, x, y, w, h); |
258 | XftDrawRect (d, &term->pix_colors[color].c, x, y, w, h); |
|
|
259 | |
257 | #else |
260 | #else |
258 | XSetForeground (disp, gc, term->pix_colors[color]); |
261 | XSetForeground (disp, gc, term->pix_colors[color]); |
259 | XFillRectangle (disp, d, gc, x, y, w, h); |
262 | XFillRectangle (disp, d, gc, x, y, w, h); |
260 | #endif |
263 | #endif |
261 | } |
264 | } |