ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/main.C
(Generate patch)

Comparing rxvt-unicode/src/main.C (file contents):
Revision 1.396 by root, Sat Dec 13 12:06:38 2014 UTC vs.
Revision 1.397 by root, Sat Dec 13 12:24:32 2014 UTC

942 942
943void 943void
944rxvt_term::set_window_color (int idx, const char *color) 944rxvt_term::set_window_color (int idx, const char *color)
945{ 945{
946#ifdef XTERM_COLOR_CHANGE 946#ifdef XTERM_COLOR_CHANGE
947 rxvt_color xcol;
948
949 if (color == NULL || *color == '\0') 947 if (color == NULL || *color == '\0')
950 return; 948 return;
951 949
952 color = strdup (color); 950 color = strdup (color);
953 allocated.push_back ((void *)color); 951 allocated.push_back ((void *)color);
959 int i = atoi (color); 957 int i = atoi (color);
960 958
961 if (i >= 8 && i <= 15) 959 if (i >= 8 && i <= 15)
962 { 960 {
963 /* bright colors */ 961 /* bright colors */
964 pix_colors_focused[idx] = pix_colors_focused[minBrightCOLOR + i - 8]; 962 alias_color (idx, minBrightCOLOR + i - 8);
965 goto done; 963 goto done;
966 } 964 }
967 965
968 if (i >= 0 && i <= 7) 966 if (i >= 0 && i <= 7)
969 { 967 {
970 /* normal colors */ 968 /* normal colors */
971 pix_colors_focused[idx] = pix_colors_focused[minCOLOR + i]; 969 alias_color (idx, minCOLOR + i);
972 goto done; 970 goto done;
973 } 971 }
974 } 972 }
975 973
976 set_color (xcol, color); 974 pix_colors_focused[idx].free (this);
977 975 set_color (pix_colors_focused[idx], color);
978 /*
979 * FIXME: should free colors here, but no idea how to do it so instead,
980 * so just keep gobbling up the colormap
981 */
982
983 pix_colors_focused[idx] = xcol;
984 976
985done: 977done:
986 /*TODO: handle Color_BD, scrollbar background, etc. */ 978 /*TODO: handle Color_BD, scrollbar background, etc. */
987 979
988 update_fade_color (idx); 980 update_fade_color (idx);
989 recolour_cursor (); 981 recolor_cursor ();
990 scr_recolour (); 982 scr_recolor ();
991#endif /* XTERM_COLOR_CHANGE */ 983#endif /* XTERM_COLOR_CHANGE */
992} 984}
993 985
994void 986void
995rxvt_term::recolour_cursor () 987rxvt_term::recolor_cursor ()
996{ 988{
997 XColor fg, bg; 989 XColor fg, bg;
998 990
999 (ISSET_PIXCOLOR (Color_pointer_fg) 991 (ISSET_PIXCOLOR (Color_pointer_fg)
1000 ? pix_colors_focused[Color_pointer_fg] 992 ? pix_colors_focused[Color_pointer_fg]

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines