… | |
… | |
2013 | /* |
2013 | /* |
2014 | * Refresh the screen |
2014 | * Refresh the screen |
2015 | * drawn_text/drawn_rend contain the screen information before the update. |
2015 | * drawn_text/drawn_rend contain the screen information before the update. |
2016 | * screen.text/screen.rend contain what the screen will change to. |
2016 | * screen.text/screen.rend contain what the screen will change to. |
2017 | */ |
2017 | */ |
2018 | |
|
|
2019 | #define FONT_WIDTH(X, Y) \ |
|
|
2020 | (X)->per_char[ (Y) - (X)->min_char_or_byte2].width |
|
|
2021 | #define FONT_RBEAR(X, Y) \ |
|
|
2022 | (X)->per_char[ (Y) - (X)->min_char_or_byte2].rbearing |
|
|
2023 | #define FONT_LBEAR(X, Y) \ |
|
|
2024 | (X)->per_char[ (Y) - (X)->min_char_or_byte2].lbearing |
|
|
2025 | #define IS_FONT_CHAR(X, Y) \ |
|
|
2026 | ((Y) >= (X)->min_char_or_byte2 && (Y) <= (X)->max_char_or_byte2) |
|
|
2027 | |
|
|
2028 | void |
2018 | void |
2029 | rxvt_term::scr_refresh (unsigned char refresh_type) |
2019 | rxvt_term::scr_refresh (unsigned char refresh_type) |
2030 | { |
2020 | { |
2031 | unsigned char must_clear, /* use draw_string not draw_image_string */ |
2021 | unsigned char must_clear, /* use draw_string not draw_image_string */ |
2032 | showcursor; /* show the cursor */ |
2022 | showcursor; /* show the cursor */ |
… | |
… | |
2051 | refresh_count = 0; |
2041 | refresh_count = 0; |
2052 | |
2042 | |
2053 | row_offset = TermWin.saveLines - TermWin.view_start; |
2043 | row_offset = TermWin.saveLines - TermWin.view_start; |
2054 | |
2044 | |
2055 | #if XPM_BACKGROUND |
2045 | #if XPM_BACKGROUND |
2056 | must_clear |= (bgPixmap.pixmap != None); |
2046 | must_clear |= bgPixmap.pixmap != None; |
2057 | #endif |
2047 | #endif |
2058 | #if TRANSPARENT |
2048 | #if TRANSPARENT |
2059 | must_clear |= ((options & Opt_transparent) && am_transparent); |
2049 | must_clear |= (options & Opt_transparent) && am_transparent; |
2060 | #endif |
2050 | #endif |
2061 | ocrow = oldcursor.row; /* is there an old outline cursor on screen? */ |
2051 | ocrow = oldcursor.row; /* is there an old outline cursor on screen? */ |
2062 | |
2052 | |
2063 | /* |
2053 | /* |
2064 | * B: reverse any characters which are selected |
2054 | * B: reverse any characters which are selected |
… | |
… | |
2088 | |
2078 | |
2089 | crp = &screen.rend[screen.cur.row + TermWin.saveLines][col]; |
2079 | crp = &screen.rend[screen.cur.row + TermWin.saveLines][col]; |
2090 | |
2080 | |
2091 | if (showcursor && TermWin.focus) |
2081 | if (showcursor && TermWin.focus) |
2092 | { |
2082 | { |
|
|
2083 | if (options & Opt_cursorUnderline) |
|
|
2084 | *crp ^= RS_Uline; |
|
|
2085 | else |
|
|
2086 | { |
2093 | *crp ^= RS_RVid; |
2087 | *crp ^= RS_RVid; |
|
|
2088 | |
2094 | #ifndef NO_CURSORCOLOR |
2089 | #ifndef NO_CURSORCOLOR |
2095 | cc1 = *crp & (RS_fgMask | RS_bgMask); |
2090 | cc1 = *crp & (RS_fgMask | RS_bgMask); |
2096 | if (ISSET_PIXCOLOR (Color_cursor)) |
2091 | if (ISSET_PIXCOLOR (Color_cursor)) |
2097 | ccol1 = Color_cursor; |
2092 | ccol1 = Color_cursor; |
2098 | else |
2093 | else |
2099 | #ifdef CURSOR_COLOR_IS_RENDITION_COLOR |
2094 | #ifdef CURSOR_COLOR_IS_RENDITION_COLOR |
2100 | ccol1 = GET_FGCOLOR (rstyle); |
2095 | ccol1 = GET_FGCOLOR (rstyle); |
2101 | #else |
2096 | #else |
2102 | ccol1 = Color_fg; |
2097 | ccol1 = Color_fg; |
2103 | #endif |
2098 | #endif |
2104 | if (ISSET_PIXCOLOR (Color_cursor2)) |
2099 | if (ISSET_PIXCOLOR (Color_cursor2)) |
2105 | ccol2 = Color_cursor2; |
2100 | ccol2 = Color_cursor2; |
2106 | else |
2101 | else |
2107 | #ifdef CURSOR_COLOR_IS_RENDITION_COLOR |
2102 | #ifdef CURSOR_COLOR_IS_RENDITION_COLOR |
2108 | ccol2 = GET_BGCOLOR (rstyle); |
2103 | ccol2 = GET_BGCOLOR (rstyle); |
2109 | #else |
2104 | #else |
2110 | ccol2 = Color_bg; |
2105 | ccol2 = Color_bg; |
2111 | #endif |
2106 | #endif |
2112 | *crp = SET_FGCOLOR (*crp, ccol1); |
2107 | *crp = SET_FGCOLOR (*crp, ccol1); |
2113 | *crp = SET_BGCOLOR (*crp, ccol2); |
2108 | *crp = SET_BGCOLOR (*crp, ccol2); |
2114 | #endif |
2109 | #endif |
|
|
2110 | } |
2115 | } |
2111 | } |
2116 | } |
2112 | } |
2117 | |
2113 | |
2118 | /* make sure no outline cursor is left around */ |
2114 | /* make sure no outline cursor is left around */ |
2119 | setoldcursor = 0; |
2115 | setoldcursor = 0; |
… | |
… | |
2425 | */ |
2421 | */ |
2426 | if (showcursor) |
2422 | if (showcursor) |
2427 | { |
2423 | { |
2428 | if (TermWin.focus) |
2424 | if (TermWin.focus) |
2429 | { |
2425 | { |
|
|
2426 | if (options & Opt_cursorUnderline) |
|
|
2427 | *crp ^= RS_Uline; |
|
|
2428 | else |
|
|
2429 | { |
2430 | *crp ^= RS_RVid; |
2430 | *crp ^= RS_RVid; |
2431 | #ifndef NO_CURSORCOLOR |
2431 | #ifndef NO_CURSORCOLOR |
2432 | *crp = (*crp & ~ (RS_fgMask | RS_bgMask)) | cc1; |
2432 | *crp = (*crp & ~ (RS_fgMask | RS_bgMask)) | cc1; |
2433 | #endif |
2433 | #endif |
|
|
2434 | } |
2434 | } |
2435 | } |
2435 | else if (oldcursor.row >= 0) |
2436 | else if (oldcursor.row >= 0) |
2436 | { |
2437 | { |
2437 | #ifndef NO_CURSORCOLOR |
2438 | #ifndef NO_CURSORCOLOR |
2438 | if (ISSET_PIXCOLOR (Color_cursor)) |
2439 | if (ISSET_PIXCOLOR (Color_cursor)) |