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

Comparing rxvt-unicode/src/screen.C (file contents):
Revision 1.167 by root, Fri Aug 5 16:42:44 2005 UTC vs.
Revision 1.170 by root, Mon Nov 28 19:35:04 2005 UTC

441 */ 441 */
442void 442void
443rxvt_term::scr_release () 443rxvt_term::scr_release ()
444{ 444{
445 unsigned int total_rows; 445 unsigned int total_rows;
446 int i;
447 446
448 total_rows = TermWin.nrow + TermWin.saveLines; 447 total_rows = TermWin.nrow + TermWin.saveLines;
449 448
450 delete talloc; talloc = 0; 449 delete talloc; talloc = 0;
451 delete ralloc; ralloc = 0; 450 delete ralloc; ralloc = 0;
778 if (len <= 0) /* sanity */ 777 if (len <= 0) /* sanity */
779 return; 778 return;
780 779
781 unsigned char checksel; 780 unsigned char checksel;
782 unicode_t c; 781 unicode_t c;
783 int i, row, last_col; 782 int row, last_col;
784 text_t *stp; 783 text_t *stp;
785 rend_t *srp; 784 rend_t *srp;
786 const unicode_t *strend = str + len; 785 const unicode_t *strend = str + len;
787 786
788 want_refresh = 1; 787 want_refresh = 1;
2161 2160
2162#if ENABLE_OVERLAY 2161#if ENABLE_OVERLAY
2163 scr_swap_overlay (); 2162 scr_swap_overlay ();
2164#endif 2163#endif
2165 2164
2166 rend_t *drp, *srp; /* drawn-rend-pointer, screen-rend-pointer */
2167 text_t *dtp, *stp; /* drawn-text-pointer, screen-text-pointer */
2168
2169#ifndef NO_SLOW_LINK_SUPPORT 2165#ifndef NO_SLOW_LINK_SUPPORT
2170 /* 2166 /*
2171 * D: CopyArea pass - very useful for slower links 2167 * D: CopyArea pass - very useful for slower links
2172 * This has been deliberately kept simple. 2168 * This has been deliberately kept simple.
2173 */ 2169 */
2308 2304
2309 // sometimes we optimize away the trailing NOCHAR's, add them back 2305 // sometimes we optimize away the trailing NOCHAR's, add them back
2310 while (i && text[count] == NOCHAR) 2306 while (i && text[count] == NOCHAR)
2311 count++, i--; 2307 count++, i--;
2312 2308
2313#if ENABLE_STYLES
2314 // force redraw after "careful" characters to avoid pixel droppings
2315 if (srp[col] & RS_Careful && col < TermWin.ncol - 1 && 0)
2316 drp[col + 1] = ~srp[col + 1];
2317
2318 // include previous careful character(s) if possible, looks nicer (best effort...)
2319 while (text > stp
2320 && srp[text - stp - 1] & RS_Careful
2321 && RS_SAME (rend, srp[text - stp - 1]))
2322 text--, count++, xpixel -= TermWin.fwidth;
2323#endif
2324
2325 /* 2309 /*
2326 * Determine the attributes for the string 2310 * Determine the attributes for the string
2327 */ 2311 */
2328 int fore = GET_FGCOLOR (rend); // desired foreground 2312 int fore = GET_FGCOLOR (rend); // desired foreground
2329 int back = GET_BGCOLOR (rend); // desired background 2313 int back = GET_BGCOLOR (rend); // desired background
2330 2314
2331 // only do special processing if ana attributes are set, which is rare 2315 // only do special processing if any attributes are set, which is rare
2332 if (rend & (RS_Bold | RS_Italic | RS_Uline | RS_RVid | RS_Blink)) 2316 if (rend & (RS_Bold | RS_Italic | RS_Uline | RS_RVid | RS_Blink | RS_Careful))
2333 { 2317 {
2318#if ENABLE_STYLES
2319 // force redraw after "careful" characters to avoid pixel droppings
2320 if (srp[col] & RS_Careful && col < TermWin.ncol - 1 && 0)
2321 drp[col + 1] = ~srp[col + 1];
2322
2323 // include previous careful character(s) if possible, looks nicer (best effort...)
2324 while (text > stp
2325 && srp[text - stp - 1] & RS_Careful
2326 && RS_SAME (rend, srp[text - stp - 1]))
2327 text--, count++, xpixel -= TermWin.fwidth;
2328#endif
2329
2334 bool invert = rend & RS_RVid; 2330 bool invert = rend & RS_RVid;
2335 2331
2336#ifndef NO_BOLD_UNDERLINE_REVERSE 2332#ifndef NO_BOLD_UNDERLINE_REVERSE
2337 if (rend & RS_Bold 2333 if (rend & RS_Bold
2338 && fore == Color_fg) 2334 && fore == Color_fg)
2365 SWAP_IT (fore, back, int); 2361 SWAP_IT (fore, back, int);
2366 2362
2367#ifndef NO_BOLD_UNDERLINE_REVERSE 2363#ifndef NO_BOLD_UNDERLINE_REVERSE
2368 if (ISSET_PIXCOLOR (Color_RV)) 2364 if (ISSET_PIXCOLOR (Color_RV))
2369 back = Color_RV; 2365 back = Color_RV;
2366
2367 if (fore == back)
2368 {
2369 fore = Color_bg;
2370 back = Color_fg;
2371 }
2370#endif 2372#endif
2371 } 2373 }
2372 2374
2373#ifdef TEXT_BLINK 2375#ifdef TEXT_BLINK
2374 if (rend & RS_Blink && (back == Color_bg || fore == Color_bg)) 2376 if (rend & RS_Blink && (back == Color_bg || fore == Color_bg))
2546 if (!TermWin.mapped) 2548 if (!TermWin.mapped)
2547 return; 2549 return;
2548 2550
2549 num_scr_allow = 0; 2551 num_scr_allow = 0;
2550 want_refresh = 1; 2552 want_refresh = 1;
2551
2552#if TRANSPARENT
2553 if ((options & Opt_transparent) && (am_pixmap_trans == 0))
2554 {
2555 int i;
2556
2557 if (!(options & Opt_transparent_all))
2558 i = 0;
2559 else
2560 i = (int) (sizeof (TermWin.parent) / sizeof (Window));
2561
2562 while (i--)
2563 if (TermWin.parent[i] != None)
2564 XClearWindow (display->display, TermWin.parent[i]);
2565 }
2566#endif
2567 2553
2568 if (really) 2554 if (really)
2569 XClearWindow (display->display, TermWin.vt); 2555 XClearWindow (display->display, TermWin.vt);
2570} 2556}
2571 2557

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines