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.166 by root, Sun Jun 26 20:06:52 2005 UTC vs.
Revision 1.171 by root, Fri Dec 16 13:05:49 2005 UTC

260 260
261 if (nrow < prev_nrow) 261 if (nrow < prev_nrow)
262 { 262 {
263 /* delete rows */ 263 /* delete rows */
264 k = min (TermWin.nscrolled, prev_nrow - nrow); 264 k = min (TermWin.nscrolled, prev_nrow - nrow);
265 // k = max (0, - ( (nrow - 1) - r->screen.cur.row)); // mmc's http://maruska.dyndns.org/wiki/scrolling-bug //make configurable? //D TODO
265 scr_scroll_text (0, (int)prev_nrow - 1, k, 1); 266 scr_scroll_text (0, (int)prev_nrow - 1, k, 1);
266 267
267 for (p = nrow; p < prev_nrow; p++) 268 for (p = nrow; p < prev_nrow; p++)
268 { 269 {
269 q = p + TermWin.saveLines; 270 q = p + TermWin.saveLines;
441 */ 442 */
442void 443void
443rxvt_term::scr_release () 444rxvt_term::scr_release ()
444{ 445{
445 unsigned int total_rows; 446 unsigned int total_rows;
446 int i;
447 447
448 total_rows = TermWin.nrow + TermWin.saveLines; 448 total_rows = TermWin.nrow + TermWin.saveLines;
449 449
450 delete talloc; talloc = 0; 450 delete talloc; talloc = 0;
451 delete ralloc; ralloc = 0; 451 delete ralloc; ralloc = 0;
778 if (len <= 0) /* sanity */ 778 if (len <= 0) /* sanity */
779 return; 779 return;
780 780
781 unsigned char checksel; 781 unsigned char checksel;
782 unicode_t c; 782 unicode_t c;
783 int i, row, last_col; 783 int row, last_col;
784 text_t *stp; 784 text_t *stp;
785 rend_t *srp; 785 rend_t *srp;
786 const unicode_t *strend = str + len; 786 const unicode_t *strend = str + len;
787 787
788 want_refresh = 1; 788 want_refresh = 1;
1948/* ------------------------------------------------------------------------- */ 1948/* ------------------------------------------------------------------------- */
1949void 1949void
1950rxvt_term::scr_bell () 1950rxvt_term::scr_bell ()
1951{ 1951{
1952#ifndef NO_BELL 1952#ifndef NO_BELL
1953
1953# ifndef NO_MAPALERT 1954# ifndef NO_MAPALERT
1954# ifdef MAPALERT_OPTION 1955# ifdef MAPALERT_OPTION
1955 if (options & Opt_mapAlert) 1956 if (options & Opt_mapAlert)
1956# endif 1957# endif
1957 XMapWindow (display->display, TermWin.parent[0]); 1958 XMapWindow (display->display, TermWin.parent[0]);
1958# endif 1959# endif
1960
1959 if (options & Opt_visualBell) 1961 if (options & Opt_visualBell)
1960 { 1962 {
1961 scr_rvideo_mode (!rvideo); /* refresh also done */ 1963 scr_rvideo_mode (!rvideo); /* refresh also done */
1964 rxvt_usleep (VISUAL_BELL_DURATION);
1962 scr_rvideo_mode (!rvideo); /* refresh also done */ 1965 scr_rvideo_mode (!rvideo); /* refresh also done */
1963 } 1966 }
1964 else 1967 else
1965 XBell (display->display, 0); 1968 XBell (display->display, 0);
1969
1966#endif 1970#endif
1967} 1971}
1968 1972
1969/* ------------------------------------------------------------------------- */ 1973/* ------------------------------------------------------------------------- */
1970/* ARGSUSED */ 1974/* ARGSUSED */
2157 2161
2158#if ENABLE_OVERLAY 2162#if ENABLE_OVERLAY
2159 scr_swap_overlay (); 2163 scr_swap_overlay ();
2160#endif 2164#endif
2161 2165
2162 rend_t *drp, *srp; /* drawn-rend-pointer, screen-rend-pointer */
2163 text_t *dtp, *stp; /* drawn-text-pointer, screen-text-pointer */
2164
2165#ifndef NO_SLOW_LINK_SUPPORT 2166#ifndef NO_SLOW_LINK_SUPPORT
2166 /* 2167 /*
2167 * D: CopyArea pass - very useful for slower links 2168 * D: CopyArea pass - very useful for slower links
2168 * This has been deliberately kept simple. 2169 * This has been deliberately kept simple.
2169 */ 2170 */
2304 2305
2305 // sometimes we optimize away the trailing NOCHAR's, add them back 2306 // sometimes we optimize away the trailing NOCHAR's, add them back
2306 while (i && text[count] == NOCHAR) 2307 while (i && text[count] == NOCHAR)
2307 count++, i--; 2308 count++, i--;
2308 2309
2309#if ENABLE_STYLES
2310 // force redraw after "careful" characters to avoid pixel droppings
2311 if (srp[col] & RS_Careful && col < TermWin.ncol - 1 && 0)
2312 drp[col + 1] = ~srp[col + 1];
2313
2314 // include previous careful character(s) if possible, looks nicer (best effort...)
2315 while (text > stp
2316 && srp[text - stp - 1] & RS_Careful
2317 && RS_SAME (rend, srp[text - stp - 1]))
2318 text--, count++, xpixel -= TermWin.fwidth;
2319#endif
2320
2321 /* 2310 /*
2322 * Determine the attributes for the string 2311 * Determine the attributes for the string
2323 */ 2312 */
2324 int fore = GET_FGCOLOR (rend); // desired foreground 2313 int fore = GET_FGCOLOR (rend); // desired foreground
2325 int back = GET_BGCOLOR (rend); // desired background 2314 int back = GET_BGCOLOR (rend); // desired background
2326 2315
2327 // only do special processing if ana attributes are set, which is rare 2316 // only do special processing if any attributes are set, which is rare
2328 if (rend & (RS_Bold | RS_Italic | RS_Uline | RS_RVid | RS_Blink)) 2317 if (rend & (RS_Bold | RS_Italic | RS_Uline | RS_RVid | RS_Blink | RS_Careful))
2329 { 2318 {
2319#if ENABLE_STYLES
2320 // force redraw after "careful" characters to avoid pixel droppings
2321 if (srp[col] & RS_Careful && col < TermWin.ncol - 1 && 0)
2322 drp[col + 1] = ~srp[col + 1];
2323
2324 // include previous careful character(s) if possible, looks nicer (best effort...)
2325 while (text > stp
2326 && srp[text - stp - 1] & RS_Careful
2327 && RS_SAME (rend, srp[text - stp - 1]))
2328 text--, count++, xpixel -= TermWin.fwidth;
2329#endif
2330
2330 bool invert = rend & RS_RVid; 2331 bool invert = rend & RS_RVid;
2331 2332
2332#ifndef NO_BOLD_UNDERLINE_REVERSE 2333#ifndef NO_BOLD_UNDERLINE_REVERSE
2333 if (rend & RS_Bold 2334 if (rend & RS_Bold
2334 && fore == Color_fg) 2335 && fore == Color_fg)
2361 SWAP_IT (fore, back, int); 2362 SWAP_IT (fore, back, int);
2362 2363
2363#ifndef NO_BOLD_UNDERLINE_REVERSE 2364#ifndef NO_BOLD_UNDERLINE_REVERSE
2364 if (ISSET_PIXCOLOR (Color_RV)) 2365 if (ISSET_PIXCOLOR (Color_RV))
2365 back = Color_RV; 2366 back = Color_RV;
2367
2368 if (fore == back)
2369 {
2370 fore = Color_bg;
2371 back = Color_fg;
2372 }
2366#endif 2373#endif
2367 } 2374 }
2368 2375
2369#ifdef TEXT_BLINK 2376#ifdef TEXT_BLINK
2370 if (rend & RS_Blink && (back == Color_bg || fore == Color_bg)) 2377 if (rend & RS_Blink && (back == Color_bg || fore == Color_bg))
2542 if (!TermWin.mapped) 2549 if (!TermWin.mapped)
2543 return; 2550 return;
2544 2551
2545 num_scr_allow = 0; 2552 num_scr_allow = 0;
2546 want_refresh = 1; 2553 want_refresh = 1;
2547
2548#if TRANSPARENT
2549 if ((options & Opt_transparent) && (am_pixmap_trans == 0))
2550 {
2551 int i;
2552
2553 if (!(options & Opt_transparent_all))
2554 i = 0;
2555 else
2556 i = (int) (sizeof (TermWin.parent) / sizeof (Window));
2557
2558 while (i--)
2559 if (TermWin.parent[i] != None)
2560 XClearWindow (display->display, TermWin.parent[i]);
2561 }
2562#endif
2563 2554
2564 if (really) 2555 if (really)
2565 XClearWindow (display->display, TermWin.vt); 2556 XClearWindow (display->display, TermWin.vt);
2566} 2557}
2567 2558

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines