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.264 by root, Thu Jul 6 18:56:10 2006 UTC vs.
Revision 1.265 by root, Tue Oct 3 11:56:48 2006 UTC

1978 int i; /* tmp */ 1978 int i; /* tmp */
1979#ifndef NO_CURSORCOLOR 1979#ifndef NO_CURSORCOLOR
1980 rend_t cc1; /* store colours at cursor position (s) */ 1980 rend_t cc1; /* store colours at cursor position (s) */
1981#endif 1981#endif
1982 rend_t *crp; // cursor rendition pointer 1982 rend_t *crp; // cursor rendition pointer
1983 rend_t ccol1, /* Cursor colour */
1984 ccol2; /* Cursor colour2 */
1983 1985
1984 want_refresh = 0; /* screen is current */ 1986 want_refresh = 0; /* screen is current */
1985 1987
1986 if (refresh_type == NO_REFRESH || !mapped) 1988 if (refresh_type == NO_REFRESH || !mapped)
1987 return; 1989 return;
2008 /* 2010 /*
2009 * C: set the cursor character (s) 2011 * C: set the cursor character (s)
2010 */ 2012 */
2011 { 2013 {
2012 unsigned char setoldcursor; 2014 unsigned char setoldcursor;
2013 rend_t ccol1, /* Cursor colour */
2014 ccol2; /* Cursor colour2 */
2015 2015
2016 showcursor = (screen.flags & Screen_VisibleCursor); 2016 showcursor = (screen.flags & Screen_VisibleCursor);
2017#ifdef CURSOR_BLINK 2017#ifdef CURSOR_BLINK
2018 if (hidden_cursor) 2018 if (hidden_cursor)
2019 showcursor = 0; 2019 showcursor = 0;
2025 2025
2026 while (col && ROW(screen.cur.row).t[col] == NOCHAR) 2026 while (col && ROW(screen.cur.row).t[col] == NOCHAR)
2027 col--; 2027 col--;
2028 2028
2029 crp = &ROW(screen.cur.row).r[col]; 2029 crp = &ROW(screen.cur.row).r[col];
2030
2031#ifndef NO_CURSORCOLOR
2032 cc1 = *crp & (RS_fgMask | RS_bgMask);
2033 if (ISSET_PIXCOLOR (Color_cursor))
2034 ccol1 = Color_cursor;
2035 else
2036#endif
2037#ifdef CURSOR_COLOR_IS_RENDITION_COLOR
2038 ccol1 = fgcolor_of (rstyle);
2039#else
2040 ccol1 = Color_fg;
2041#endif
2042
2043#ifndef NO_CURSORCOLOR
2044 if (ISSET_PIXCOLOR (Color_cursor2))
2045 ccol2 = Color_cursor2;
2046 else
2047#endif
2048#ifdef CURSOR_COLOR_IS_RENDITION_COLOR
2049 ccol2 = bgcolor_of (rstyle);
2050#else
2051 ccol2 = Color_bg;
2052#endif
2030 2053
2031 if (showcursor && focus) 2054 if (showcursor && focus)
2032 { 2055 {
2033 if (OPTION (Opt_cursorUnderline)) 2056 if (OPTION (Opt_cursorUnderline))
2034 *crp ^= RS_Uline; 2057 *crp ^= RS_Uline;
2035 else 2058 else
2036 { 2059 {
2037 *crp ^= RS_RVid; 2060 *crp ^= RS_RVid;
2038
2039#ifndef NO_CURSORCOLOR
2040 cc1 = *crp & (RS_fgMask | RS_bgMask);
2041 if (ISSET_PIXCOLOR (Color_cursor))
2042 ccol1 = Color_cursor;
2043 else
2044#ifdef CURSOR_COLOR_IS_RENDITION_COLOR
2045 ccol1 = fgcolor_of (rstyle);
2046#else
2047 ccol1 = Color_fg;
2048#endif
2049 if (ISSET_PIXCOLOR (Color_cursor2))
2050 ccol2 = Color_cursor2;
2051 else
2052#ifdef CURSOR_COLOR_IS_RENDITION_COLOR
2053 ccol2 = bgcolor_of (rstyle);
2054#else
2055 ccol2 = Color_bg;
2056#endif
2057 *crp = SET_FGCOLOR (*crp, ccol1); 2061 *crp = SET_FGCOLOR (*crp, ccol1);
2058 *crp = SET_BGCOLOR (*crp, ccol2); 2062 *crp = SET_BGCOLOR (*crp, ccol2);
2059#endif
2060 } 2063 }
2061 } 2064 }
2062 } 2065 }
2063 2066
2064 /* make sure no outline cursor is left around */ 2067 /* make sure no outline cursor is left around */
2418 cursorwidth++; 2421 cursorwidth++;
2419 2422
2420#ifndef NO_CURSORCOLOR 2423#ifndef NO_CURSORCOLOR
2421 if (ISSET_PIXCOLOR (Color_cursor)) 2424 if (ISSET_PIXCOLOR (Color_cursor))
2422 XSetForeground (dpy, gc, pix_colors[Color_cursor]); 2425 XSetForeground (dpy, gc, pix_colors[Color_cursor]);
2426 else
2423#endif 2427#endif
2428 XSetForeground (dpy, gc, pix_colors[ccol1]);
2424 2429
2425 XDrawRectangle (dpy, drawBuffer, gc, 2430 XDrawRectangle (dpy, drawBuffer, gc,
2426 Col2Pixel (col), 2431 Col2Pixel (col),
2427 Row2Pixel (oldcursor.row), 2432 Row2Pixel (oldcursor.row),
2428 (unsigned int) (Width2Pixel (cursorwidth) - 1), 2433 (unsigned int) (Width2Pixel (cursorwidth) - 1),

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines