… | |
… | |
2169 | * Actually do the drawing of the string here |
2169 | * Actually do the drawing of the string here |
2170 | */ |
2170 | */ |
2171 | rxvt_font *font = (*TermWin.fontset)[fid]; |
2171 | rxvt_font *font = (*TermWin.fontset)[fid]; |
2172 | |
2172 | |
2173 | if (back == fore) |
2173 | if (back == fore) |
2174 | font->clear_rect (xpixel, ypixel, |
2174 | font->clear_rect (*TermWin.drawable, xpixel, ypixel, |
2175 | TermWin.fwidth * count, TermWin.fheight, |
2175 | TermWin.fwidth * count, TermWin.fheight, |
2176 | back); |
2176 | back); |
2177 | else if (back == Color_bg) |
2177 | else if (back == Color_bg) |
2178 | { |
2178 | { |
2179 | if (must_clear) |
2179 | if (must_clear) |
… | |
… | |
2181 | CLEAR_CHARS (xpixel, ypixel, count); |
2181 | CLEAR_CHARS (xpixel, ypixel, count); |
2182 | |
2182 | |
2183 | for (i = 0; i < count; i++) /* don't draw empty strings */ |
2183 | for (i = 0; i < count; i++) /* don't draw empty strings */ |
2184 | if (text[i] != ' ') |
2184 | if (text[i] != ' ') |
2185 | { |
2185 | { |
2186 | font->draw (xpixel, ypixel, text, count, fore, -1); |
2186 | font->draw (*TermWin.drawable, xpixel, ypixel, text, count, fore, -1); |
2187 | break; |
2187 | break; |
2188 | } |
2188 | } |
2189 | } |
2189 | } |
2190 | else |
2190 | else |
2191 | font->draw (xpixel, ypixel, text, count, fore, Color_bg); |
2191 | font->draw (*TermWin.drawable, xpixel, ypixel, text, count, fore, Color_bg); |
2192 | } |
2192 | } |
2193 | else |
2193 | else |
2194 | font->draw (xpixel, ypixel, text, count, fore, back); |
2194 | font->draw (*TermWin.drawable, xpixel, ypixel, text, count, fore, back); |
2195 | |
2195 | |
2196 | if ((rend & RS_Uline) && (font->descent > 1)) |
2196 | if ((rend & RS_Uline) && (font->descent > 1)) |
2197 | XDrawLine (display->display, drawBuffer, TermWin.gc, |
2197 | XDrawLine (display->display, drawBuffer, TermWin.gc, |
2198 | xpixel, ypixel + font->ascent + 1, |
2198 | xpixel, ypixel + font->ascent + 1, |
2199 | xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1); |
2199 | xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1); |
… | |
… | |
2260 | num_scr = 0; |
2260 | num_scr = 0; |
2261 | num_scr_allow = 1; |
2261 | num_scr_allow = 1; |
2262 | want_refresh = 0; /* screen is current */ |
2262 | want_refresh = 0; /* screen is current */ |
2263 | } |
2263 | } |
2264 | |
2264 | |
|
|
2265 | void |
|
|
2266 | rxvt_term::scr_remap_chars (text_t *tp, rend_t *rp) |
|
|
2267 | { |
|
|
2268 | if (!rp || !tp) |
|
|
2269 | return; |
|
|
2270 | |
|
|
2271 | for (int i = TermWin.ncol; i; i--, rp++, tp++) |
|
|
2272 | *rp = SET_FONT (*rp, TermWin.fontset->find_font (*tp)); |
|
|
2273 | } |
|
|
2274 | |
|
|
2275 | void |
|
|
2276 | rxvt_term::scr_remap_chars () |
|
|
2277 | { |
|
|
2278 | for (int i = TermWin.nrow + TermWin.saveLines; i--; ) |
|
|
2279 | scr_remap_chars (screen.text[i], screen.rend[i]); |
|
|
2280 | |
|
|
2281 | for (int i = TermWin.nrow; i--; ) |
|
|
2282 | { |
|
|
2283 | scr_remap_chars (drawn_text[i], drawn_rend[i]); |
|
|
2284 | scr_remap_chars (swap.text[i], swap.rend[i]); |
|
|
2285 | } |
|
|
2286 | } |
|
|
2287 | |
2265 | /* ------------------------------------------------------------------------- */ |
2288 | /* ------------------------------------------------------------------------- */ |
2266 | void |
2289 | void |
2267 | rxvt_term::scr_clear () |
2290 | rxvt_term::scr_clear () |
2268 | { |
2291 | { |
2269 | if (!TermWin.mapped) |
2292 | if (!TermWin.mapped) |
… | |
… | |
2667 | rxvt_term::selection_clear () |
2690 | rxvt_term::selection_clear () |
2668 | { |
2691 | { |
2669 | D_SELECT ((stderr, "rxvt_selection_clear ()")); |
2692 | D_SELECT ((stderr, "rxvt_selection_clear ()")); |
2670 | |
2693 | |
2671 | want_refresh = 1; |
2694 | want_refresh = 1; |
2672 | if (selection.text) |
|
|
2673 | free (selection.text); |
2695 | free (selection.text); |
2674 | selection.text = NULL; |
2696 | selection.text = NULL; |
2675 | selection.len = 0; |
2697 | selection.len = 0; |
2676 | CLEAR_SELECTION (); |
2698 | CLEAR_SELECTION (); |
2677 | } |
2699 | } |
2678 | |
2700 | |