… | |
… | |
1345 | if (ep != enc) |
1345 | if (ep != enc) |
1346 | { |
1346 | { |
1347 | rxvt_drawable &d2 = d.screen->scratch_drawable (w, h); |
1347 | rxvt_drawable &d2 = d.screen->scratch_drawable (w, h); |
1348 | |
1348 | |
1349 | #ifdef HAVE_BG_PIXMAP |
1349 | #ifdef HAVE_BG_PIXMAP |
1350 | Picture dst = 0; |
1350 | Picture dst = 0; // the only assignment is done conditionally in the following if condition |
1351 | |
1351 | |
1352 | if (term->bgPixmap.pixmap |
1352 | if (term->bgPixmap.pixmap |
1353 | && (bg == Color_transparent || bg == Color_bg |
1353 | && (bg == Color_transparent || bg == Color_bg |
1354 | || (bg >= 0 && !term->pix_colors[bg].is_opaque () && ((dst = XftDrawPicture (d2)))))) |
1354 | || (bg >= 0 && !term->pix_colors[bg].is_opaque () && ((dst = XftDrawPicture (d2)))))) |
1355 | { |
1355 | { |
… | |
… | |
1388 | |
1388 | |
1389 | if (dst) |
1389 | if (dst) |
1390 | { |
1390 | { |
1391 | Picture solid_color_pict = XftDrawSrcPicture (d2, &term->pix_colors[bg].c); |
1391 | Picture solid_color_pict = XftDrawSrcPicture (d2, &term->pix_colors[bg].c); |
1392 | |
1392 | |
|
|
1393 | // dst can only be set when bg >= 0 |
1393 | XRenderComposite (disp, PictOpOver, solid_color_pict, None, dst, 0, 0, 0, 0, 0, 0, w, h); |
1394 | XRenderComposite (disp, PictOpOver, solid_color_pict, None, dst, 0, 0, 0, 0, 0, 0, w, h); |
1394 | } |
1395 | } |
1395 | } |
1396 | } |
1396 | else |
1397 | else |
1397 | #endif |
1398 | #endif |
1398 | clear_rect (d, x, y, w, h, bg); |
1399 | XftDrawRect (d2, &term->pix_colors[bg >= 0 ? bg : Color_bg].c, 0, 0, w, h); |
1399 | |
1400 | |
1400 | XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc); |
1401 | XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc); |
1401 | XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y); |
1402 | XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y); |
1402 | } |
1403 | } |
1403 | else |
1404 | else |