… | |
… | |
1325 | |
1325 | |
1326 | #ifdef HAVE_BG_PIXMAP |
1326 | #ifdef HAVE_BG_PIXMAP |
1327 | if (term->bgPixmap.pixmap) |
1327 | if (term->bgPixmap.pixmap) |
1328 | { |
1328 | { |
1329 | Picture dst = 0; |
1329 | Picture dst = 0; |
|
|
1330 | |
1330 | if (bg >= 0 && term->pix_colors[bg].c.color.alpha < 0x0ff00) |
1331 | if (bg >= 0 && term->pix_colors[bg].c.color.alpha < 0x0ff00) |
1331 | dst = XftDrawPicture(d2); |
1332 | dst = XftDrawPicture (d2); |
1332 | |
1333 | |
1333 | if (bg < 0 || dst != 0) |
1334 | if (bg < 0 || dst != 0) |
1334 | { |
1335 | { |
|
|
1336 | int src_x = x, src_y = y ; |
|
|
1337 | |
|
|
1338 | if (term->bgPixmap.is_parentOrigin ()) |
|
|
1339 | { |
|
|
1340 | src_x += term->window_vt_x; |
|
|
1341 | src_y += term->window_vt_y; |
|
|
1342 | } |
|
|
1343 | |
1335 | if (term->bgPixmap.pmap_width >= x + term->window_vt_x+w |
1344 | if (term->bgPixmap.pmap_width >= src_x+w |
1336 | && term->bgPixmap.pmap_height >= y + term->window_vt_y+h) |
1345 | && term->bgPixmap.pmap_height >= src_y+h) |
1337 | { |
1346 | { |
1338 | XCopyArea (disp, term->bgPixmap.pixmap, d2, gc, |
1347 | XCopyArea (disp, term->bgPixmap.pixmap, d2, gc, |
1339 | x + term->window_vt_x, y + term->window_vt_y, |
|
|
1340 | w, h, 0, 0); |
1348 | src_x, src_y, w, h, 0, 0); |
1341 | } |
1349 | } |
1342 | else |
1350 | else |
1343 | { |
1351 | { |
1344 | XGCValues gcv; |
1352 | XGCValues gcv; |
1345 | |
1353 | |
1346 | gcv.fill_style = FillTiled; |
1354 | gcv.fill_style = FillTiled; |
1347 | gcv.tile = term->bgPixmap.pixmap; |
1355 | gcv.tile = term->bgPixmap.pixmap; |
1348 | gcv.ts_x_origin = -x; |
1356 | gcv.ts_x_origin = -src_x; |
1349 | gcv.ts_y_origin = -y; |
1357 | gcv.ts_y_origin = -src_y; |
1350 | |
1358 | |
1351 | XChangeGC (disp, gc, |
1359 | XChangeGC (disp, gc, |
1352 | GCTile | GCTileStipXOrigin | GCTileStipYOrigin | GCFillStyle, |
1360 | GCTile | GCTileStipXOrigin | GCTileStipYOrigin | GCFillStyle, |
1353 | &gcv); |
1361 | &gcv); |
1354 | |
1362 | |
1355 | XFillRectangle (disp, d2, gc/*gc2*/, 0, 0, w, h); |
1363 | XFillRectangle (disp, d2, gc, 0, 0, w, h); |
1356 | |
1364 | |
1357 | gcv.fill_style = FillSolid; |
1365 | gcv.fill_style = FillSolid; |
1358 | XChangeGC (disp, gc, GCFillStyle, &gcv); |
1366 | XChangeGC (disp, gc, GCFillStyle, &gcv); |
1359 | } |
1367 | } |
1360 | |
1368 | |
… | |
… | |
1367 | back_rendered = true; |
1375 | back_rendered = true; |
1368 | } |
1376 | } |
1369 | } |
1377 | } |
1370 | #endif |
1378 | #endif |
1371 | |
1379 | |
1372 | if(bg >= 0 && !back_rendered) |
1380 | if (bg >= 0 && !back_rendered) |
1373 | XftDrawRect (d2, &term->pix_colors[bg].c, 0, 0, w, h); |
1381 | XftDrawRect (d2, &term->pix_colors[bg].c, 0, 0, w, h); |
1374 | |
1382 | |
1375 | XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc); |
1383 | XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc); |
1376 | XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y); |
1384 | XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y); |
1377 | } |
1385 | } |