ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtfont.C
(Generate patch)

Comparing rxvt-unicode/src/rxvtfont.C (file contents):
Revision 1.110 by sasha, Fri Aug 3 22:40:10 2007 UTC vs.
Revision 1.111 by sasha, Fri Aug 17 22:01:33 2007 UTC

1272 dTermGC; 1272 dTermGC;
1273 1273
1274 int w = term->fwidth * len; 1274 int w = term->fwidth * len;
1275 int h = term->fheight; 1275 int h = term->fheight;
1276 1276
1277 bool buffered = bg >= 0 // we don't use a transparent bg 1277 /* TODO: this logic needs some more thinking, since we no longer do pseudo-transparency.
1278 * Maybe make buffering into a resource flag? Compile time option doesn't seems like a
1279 * good idea from the perspective of packaging for wide variety of user configs.
1280 */
1281 bool buffered = true
1278#ifndef FORCE_UNBUFFERED_XFT 1282#ifdef FORCE_UNBUFFERED_XFT
1279# ifdef ENABLE_TRANSPARENCY 1283 && bg >= 0
1280 || !term->am_transparent // we aren't transparent
1281# endif
1282#endif 1284#endif
1283 ; 1285 ;
1284
1285 // cut trailing spaces 1286 // cut trailing spaces
1286 while (len && text [len - 1] == ' ') 1287 while (len && text [len - 1] == ' ')
1287 len--; 1288 len--;
1288 1289
1289 int x_ = buffered ? 0 : x; 1290 int x_ = buffered ? 0 : x;
1318 if (buffered) 1319 if (buffered)
1319 { 1320 {
1320 if (ep != enc) 1321 if (ep != enc)
1321 { 1322 {
1322 rxvt_drawable &d2 = d.screen->scratch_drawable (w, h); 1323 rxvt_drawable &d2 = d.screen->scratch_drawable (w, h);
1324 bool back_rendered = false;
1323 1325
1324 if (0)
1325 ;
1326#ifdef HAVE_BG_PIXMAP 1326#ifdef HAVE_BG_PIXMAP
1327 else if (bg < 0 && term->bgPixmap.pixmap) 1327 if (term->bgPixmap.pixmap && (bg < 0 || term->pix_colors[bg].c.color.alpha < 0x0ff00))
1328 { 1328 {
1329 if (term->bgPixmap.pmap_width >= x + term->window_vt_x+w 1329 if (term->bgPixmap.pmap_width >= x + term->window_vt_x+w
1330 && term->bgPixmap.pmap_height >= y + term->window_vt_y+h) 1330 && term->bgPixmap.pmap_height >= y + term->window_vt_y+h)
1331 { 1331 {
1332 XCopyArea (disp, term->bgPixmap.pixmap, d2, gc, 1332 XCopyArea (disp, term->bgPixmap.pixmap, d2, gc,
1354 XFillRectangle (disp, d2, gc/*gc2*/, 0, 0, w, h); 1354 XFillRectangle (disp, d2, gc/*gc2*/, 0, 0, w, h);
1355 1355
1356 gcv.fill_style = FillSolid; 1356 gcv.fill_style = FillSolid;
1357 XChangeGC (disp, gc, GCFillStyle, &gcv); 1357 XChangeGC (disp, gc, GCFillStyle, &gcv);
1358 /* XFreeGC (disp, gc2); */ 1358 /* XFreeGC (disp, gc2); */
1359 1359
1360 } 1360 }
1361 if (bg > 0)
1362 {
1363 Picture dst = XftDrawPicture(d2);
1364 if (dst != 0)
1365 {
1366 Picture solid_color_pict = XftDrawSrcPicture (d2, &term->pix_colors[bg].c);
1367 XRenderComposite (disp, PictOpOver, solid_color_pict, None, dst, 0, 0, 0, 0, 0, 0, w, h);
1368 }
1369 }
1370 back_rendered = true;
1361 } 1371 }
1362#endif 1372#endif
1363 else 1373
1374 if(bg > 0 && !back_rendered)
1364 XftDrawRect (d2, &term->pix_colors[bg].c, 0, 0, w, h); 1375 XftDrawRect (d2, &term->pix_colors[bg].c, 0, 0, w, h);
1365 1376
1366 XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc); 1377 XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc);
1367 XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y); 1378 XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y);
1368 } 1379 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines