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.449 by sf-exg, Wed Nov 19 12:21:11 2014 UTC vs.
Revision 1.454 by sf-exg, Sun Jan 18 13:08:46 2015 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 && cursor_type != 2) 2123 if (focus && cursor_type == 0)
2124 { 2124 {
2125 rend_t rend = cur_rend; 2125 rend_t rend = cur_rend;
2126 2126
2127 if (cursor_type == 1)
2128 rend ^= RS_Uline;
2129 else
2130 {
2131 rend ^= RS_RVid; 2127 rend ^= RS_RVid;
2132 rend = SET_FGCOLOR (rend, ccol1); 2128 rend = SET_FGCOLOR (rend, ccol1);
2133 rend = SET_BGCOLOR (rend, ccol2); 2129 rend = SET_BGCOLOR (rend, ccol2);
2134 }
2135 2130
2136 scr_set_char_rend (ROW(screen.cur.row), cur_col, rend); 2131 scr_set_char_rend (ROW(screen.cur.row), cur_col, rend);
2137 } 2132 }
2138 } 2133 }
2139 2134
2140 /* make sure no outline cursor is left around */ 2135 /* make sure no outline cursor is left around */
2141 if (ocrow != -1) 2136 if (ocrow != -1 && ocrow < nrow && oldcursor.col < ncol)
2142 {
2143 if (screen.cur.row - view_start != ocrow
2144 || screen.cur.col != oldcursor.col || !showcursor)
2145 {
2146 if (ocrow < nrow
2147 && oldcursor.col < ncol)
2148 drawn_buf[ocrow].r[oldcursor.col] ^= (RS_RVid | RS_Uline); 2137 drawn_buf[ocrow].r[oldcursor.col] ^= (RS_RVid | RS_Uline);
2149 }
2150 }
2151 2138
2152 // save the current cursor coordinates if the cursor is visible 2139 // save the current cursor coordinates if the cursor is visible
2153 // and either the window is unfocused or the cursor style is 2140 // and either the window is unfocused or the cursor style is
2154 // vertical bar, so as to clear the outline cursor in the next 2141 // underline or vertical bar, so as to clear the outline cursor in
2155 // refresh if the cursor moves or becomes invisible 2142 // the next refresh if the cursor moves or becomes invisible
2156 if (showcursor && (!focus || cursor_type == 2) && screen.cur.row - view_start < nrow) 2143 if (showcursor && (!focus || cursor_type != 0) && screen.cur.row - view_start < nrow)
2157 { 2144 {
2158 oldcursor.row = screen.cur.row - view_start; 2145 oldcursor.row = screen.cur.row - view_start;
2159 oldcursor.col = screen.cur.col; 2146 oldcursor.col = screen.cur.col;
2160 } 2147 }
2161 else 2148 else
2455 */ 2442 */
2456 if (showcursor) 2443 if (showcursor)
2457 { 2444 {
2458 if (focus) 2445 if (focus)
2459 { 2446 {
2460 if (cursor_type != 2) 2447 if (cursor_type == 0)
2461 scr_set_char_rend (ROW(screen.cur.row), cur_col, cur_rend); 2448 scr_set_char_rend (ROW(screen.cur.row), cur_col, cur_rend);
2462 else if (oldcursor.row >= 0) 2449 else if (oldcursor.row >= 0)
2463 { 2450 {
2464 XSetForeground (dpy, gc, pix_colors[ccol1]); 2451 XSetForeground (dpy, gc, pix_colors[ccol1]);
2452 if (cursor_type == 1)
2465 XFillRectangle (dpy, vt, gc, 2453 XFillRectangle (dpy, vt, gc,
2466 Col2Pixel (cur_col), 2454 Col2Pixel (cur_col),
2455 Row2Pixel (oldcursor.row + 1) - 2,
2456 Width2Pixel (1),
2457 2);
2458 else
2459 XFillRectangle (dpy, vt, gc,
2460 Col2Pixel (cur_col),
2467 Row2Pixel (oldcursor.row), 2461 Row2Pixel (oldcursor.row),
2468 1, 2462 2,
2469 Height2Pixel (1)); 2463 Height2Pixel (1));
2470 } 2464 }
2471 } 2465 }
2472 else if (oldcursor.row >= 0) 2466 else if (oldcursor.row >= 0)
2473 { 2467 {
2474 XSetForeground (dpy, gc, pix_colors[ccol1]); 2468 XSetForeground (dpy, gc, pix_colors[ccol1]);
2520 scr_remap_chars (swap_buf [i]); 2514 scr_remap_chars (swap_buf [i]);
2521 } 2515 }
2522} 2516}
2523 2517
2524void ecb_cold 2518void ecb_cold
2525rxvt_term::scr_recolour (bool refresh) NOTHROW 2519rxvt_term::scr_recolor (bool refresh) NOTHROW
2526{ 2520{
2527 bool transparent = false; 2521 bool transparent = false;
2528 2522
2529#ifdef HAVE_IMG 2523#ifdef HAVE_IMG
2530 if (bg_img != 0) 2524 if (bg_img != 0)
2551 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); 2545 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]);
2552 } 2546 }
2553 2547
2554 XClearWindow (dpy, parent); 2548 XClearWindow (dpy, parent);
2555 2549
2556 if (scrollBar.win) 2550 if (scrollBar.state && scrollBar.win)
2557 { 2551 {
2558 if (transparent) 2552 if (transparent)
2559 XSetWindowBackgroundPixmap (dpy, scrollBar.win, ParentRelative); 2553 XSetWindowBackgroundPixmap (dpy, scrollBar.win, ParentRelative);
2560 else 2554 else
2561 XSetWindowBackground (dpy, scrollBar.win, pix_colors[scrollBar.color ()]); 2555 XSetWindowBackground (dpy, scrollBar.win, pix_colors[scrollBar.color ()]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines