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.446 by root, Thu May 22 18:54:33 2014 UTC vs.
Revision 1.450 by mikachu, Sat Dec 6 09:20:13 2014 UTC

2118 ccol2 = bgcolor_of (rstyle); 2118 ccol2 = bgcolor_of (rstyle);
2119#else 2119#else
2120 ccol2 = Color_bg; 2120 ccol2 = Color_bg;
2121#endif 2121#endif
2122 2122
2123 if (focus) 2123 if (focus && cursor_type != 2)
2124 { 2124 {
2125 rend_t rend = cur_rend; 2125 rend_t rend = cur_rend;
2126 2126
2127 if (option (Opt_cursorUnderline)) 2127 if (cursor_type == 1)
2128 rend ^= RS_Uline; 2128 rend ^= RS_Uline;
2129 else 2129 else
2130 { 2130 {
2131 rend ^= RS_RVid; 2131 rend ^= RS_RVid;
2132 rend = SET_FGCOLOR (rend, ccol1); 2132 rend = SET_FGCOLOR (rend, ccol1);
2139 2139
2140 /* make sure no outline cursor is left around */ 2140 /* make sure no outline cursor is left around */
2141 if (ocrow != -1) 2141 if (ocrow != -1)
2142 { 2142 {
2143 if (screen.cur.row - view_start != ocrow 2143 if (screen.cur.row - view_start != ocrow
2144 || screen.cur.col != oldcursor.col) 2144 || screen.cur.col != oldcursor.col || !showcursor)
2145 { 2145 {
2146 if (ocrow < nrow 2146 if (ocrow < nrow
2147 && oldcursor.col < ncol) 2147 && oldcursor.col < ncol)
2148 drawn_buf[ocrow].r[oldcursor.col] ^= (RS_RVid | RS_Uline); 2148 drawn_buf[ocrow].r[oldcursor.col] ^= (RS_RVid | RS_Uline);
2149 } 2149 }
2150 } 2150 }
2151 2151
2152 // save the current cursor coordinates if the cursor is visible 2152 // save the current cursor coordinates if the cursor is visible
2153 // and the window is unfocused, so as to clear the outline cursor 2153 // and either the window is unfocused or the cursor style is
2154 // in the next refresh if the cursor moves 2154 // vertical bar, so as to clear the outline cursor in the next
2155 // refresh if the cursor moves or becomes invisible
2155 if (showcursor && !focus && screen.cur.row - view_start < nrow) 2156 if (showcursor && (!focus || cursor_type == 2) && screen.cur.row - view_start < nrow)
2156 { 2157 {
2157 oldcursor.row = screen.cur.row - view_start; 2158 oldcursor.row = screen.cur.row - view_start;
2158 oldcursor.col = screen.cur.col; 2159 oldcursor.col = screen.cur.col;
2159 } 2160 }
2160 else 2161 else
2247 int ypixel = (int)Row2Pixel (row); 2248 int ypixel = (int)Row2Pixel (row);
2248 2249
2249 for (col = 0; col < ncol; col++) 2250 for (col = 0; col < ncol; col++)
2250 { 2251 {
2251 /* compare new text with old - if exactly the same then continue */ 2252 /* compare new text with old - if exactly the same then continue */
2252 if (stp[col] == dtp[col] /* Must match characters to skip. */ 2253 if (stp[col] == dtp[col] && RS_SAME (srp[col], drp[col]))
2253 && (RS_SAME (srp[col], drp[col]) /* Either rendition the same or */
2254 || (stp[col] == ' ' /* space w/ no background change */
2255 && GET_BGATTR (srp[col]) == GET_BGATTR (drp[col]))))
2256 continue; 2254 continue;
2257 2255
2258 // redraw one or more characters 2256 // redraw one or more characters
2259 2257
2260 // seek to the beginning of wide characters 2258 // seek to the beginning of wide characters
2456 * G: cleanup cursor and display outline cursor if necessary 2454 * G: cleanup cursor and display outline cursor if necessary
2457 */ 2455 */
2458 if (showcursor) 2456 if (showcursor)
2459 { 2457 {
2460 if (focus) 2458 if (focus)
2459 {
2460 if (cursor_type != 2)
2461 scr_set_char_rend (ROW(screen.cur.row), cur_col, cur_rend); 2461 scr_set_char_rend (ROW(screen.cur.row), cur_col, cur_rend);
2462 else if (oldcursor.row >= 0)
2463 {
2464 XSetForeground (dpy, gc, pix_colors[ccol1]);
2465 XFillRectangle (dpy, vt, gc,
2466 Col2Pixel (cur_col),
2467 Row2Pixel (oldcursor.row),
2468 1,
2469 Height2Pixel (1));
2470 }
2471 }
2462 else if (oldcursor.row >= 0) 2472 else if (oldcursor.row >= 0)
2463 { 2473 {
2464 XSetForeground (dpy, gc, pix_colors[ccol1]); 2474 XSetForeground (dpy, gc, pix_colors[ccol1]);
2465 2475
2466 XDrawRectangle (dpy, vt, gc, 2476 XDrawRectangle (dpy, vt, gc,
2541 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); 2551 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]);
2542 } 2552 }
2543 2553
2544 XClearWindow (dpy, parent); 2554 XClearWindow (dpy, parent);
2545 2555
2546 if (scrollBar.win) 2556 if (scrollBar.state)
2547 { 2557 {
2548 if (transparent) 2558 if (transparent)
2549 XSetWindowBackgroundPixmap (dpy, scrollBar.win, ParentRelative); 2559 XSetWindowBackgroundPixmap (dpy, scrollBar.win, ParentRelative);
2550 else 2560 else
2551 XSetWindowBackground (dpy, scrollBar.win, pix_colors[scrollBar.color ()]); 2561 XSetWindowBackground (dpy, scrollBar.win, pix_colors[scrollBar.color ()]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines