1 | /*----------------------------------------------------------------------* |
1 | /*----------------------------------------------------------------------* |
2 | * File: rxvtfont.C |
2 | * File: rxvtfont.C |
3 | *----------------------------------------------------------------------* |
3 | *----------------------------------------------------------------------* |
4 | * Copyright (c) 2003-2006 Marc Lehmann <pcg@goof.com> |
4 | * Copyright (c) 2003-2008 Marc Lehmann <pcg@goof.com> |
5 | * - original version. |
5 | * - original version. |
6 | * |
6 | * |
7 | * This program is free software; you can redistribute it and/or modify |
7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by |
8 | * it under the terms of the GNU General Public License as published by |
9 | * the Free Software Foundation; either version 2 of the License, or |
9 | * the Free Software Foundation; either version 2 of the License, or |
… | |
… | |
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 |