--- rxvt-unicode/src/screen.C 2005/06/26 20:06:52 1.166 +++ rxvt-unicode/src/screen.C 2005/11/28 19:35:04 1.170 @@ -443,7 +443,6 @@ rxvt_term::scr_release () { unsigned int total_rows; - int i; total_rows = TermWin.nrow + TermWin.saveLines; @@ -780,7 +779,7 @@ unsigned char checksel; unicode_t c; - int i, row, last_col; + int row, last_col; text_t *stp; rend_t *srp; const unicode_t *strend = str + len; @@ -1950,19 +1949,23 @@ rxvt_term::scr_bell () { #ifndef NO_BELL + # ifndef NO_MAPALERT # ifdef MAPALERT_OPTION if (options & Opt_mapAlert) # endif XMapWindow (display->display, TermWin.parent[0]); # endif + if (options & Opt_visualBell) { scr_rvideo_mode (!rvideo); /* refresh also done */ + rxvt_usleep (VISUAL_BELL_DURATION); scr_rvideo_mode (!rvideo); /* refresh also done */ } else XBell (display->display, 0); + #endif } @@ -2159,9 +2162,6 @@ scr_swap_overlay (); #endif - rend_t *drp, *srp; /* drawn-rend-pointer, screen-rend-pointer */ - text_t *dtp, *stp; /* drawn-text-pointer, screen-text-pointer */ - #ifndef NO_SLOW_LINK_SUPPORT /* * D: CopyArea pass - very useful for slower links @@ -2306,27 +2306,27 @@ while (i && text[count] == NOCHAR) count++, i--; -#if ENABLE_STYLES - // force redraw after "careful" characters to avoid pixel droppings - if (srp[col] & RS_Careful && col < TermWin.ncol - 1 && 0) - drp[col + 1] = ~srp[col + 1]; - - // include previous careful character(s) if possible, looks nicer (best effort...) - while (text > stp - && srp[text - stp - 1] & RS_Careful - && RS_SAME (rend, srp[text - stp - 1])) - text--, count++, xpixel -= TermWin.fwidth; -#endif - /* * Determine the attributes for the string */ int fore = GET_FGCOLOR (rend); // desired foreground int back = GET_BGCOLOR (rend); // desired background - // only do special processing if ana attributes are set, which is rare - if (rend & (RS_Bold | RS_Italic | RS_Uline | RS_RVid | RS_Blink)) + // only do special processing if any attributes are set, which is rare + if (rend & (RS_Bold | RS_Italic | RS_Uline | RS_RVid | RS_Blink | RS_Careful)) { +#if ENABLE_STYLES + // force redraw after "careful" characters to avoid pixel droppings + if (srp[col] & RS_Careful && col < TermWin.ncol - 1 && 0) + drp[col + 1] = ~srp[col + 1]; + + // include previous careful character(s) if possible, looks nicer (best effort...) + while (text > stp + && srp[text - stp - 1] & RS_Careful + && RS_SAME (rend, srp[text - stp - 1])) + text--, count++, xpixel -= TermWin.fwidth; +#endif + bool invert = rend & RS_RVid; #ifndef NO_BOLD_UNDERLINE_REVERSE @@ -2363,6 +2363,12 @@ #ifndef NO_BOLD_UNDERLINE_REVERSE if (ISSET_PIXCOLOR (Color_RV)) back = Color_RV; + + if (fore == back) + { + fore = Color_bg; + back = Color_fg; + } #endif } @@ -2545,22 +2551,6 @@ num_scr_allow = 0; want_refresh = 1; -#if TRANSPARENT - if ((options & Opt_transparent) && (am_pixmap_trans == 0)) - { - int i; - - if (!(options & Opt_transparent_all)) - i = 0; - else - i = (int) (sizeof (TermWin.parent) / sizeof (Window)); - - while (i--) - if (TermWin.parent[i] != None) - XClearWindow (display->display, TermWin.parent[i]); - } -#endif - if (really) XClearWindow (display->display, TermWin.vt); }