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.70 by root, Mon Jul 26 18:01:19 2004 UTC vs.
Revision 1.73 by root, Fri Jul 30 14:59:12 2004 UTC

242 XDestroyWindow (display->display, TermWin.parent[0]); 242 XDestroyWindow (display->display, TermWin.parent[0]);
243 } 243 }
244 244
245 // TODO: free pixcolours, colours should become part of rxvt_display 245 // TODO: free pixcolours, colours should become part of rxvt_display
246 246
247 delete PixColors; 247 delete PixColorsFocused;
248#ifdef OFF_FOCUS_FADING
249 delete PixColorsUnFocused;
250#endif
248 251
249 displays.put (display); 252 displays.put (display);
250 253
251 scr_release (); 254 scr_release ();
252 255
955 i = atoi (color); 958 i = atoi (color);
956 if (i >= 8 && i <= 15) 959 if (i >= 8 && i <= 15)
957 { /* bright colors */ 960 { /* bright colors */
958 i -= 8; 961 i -= 8;
959# ifndef NO_BRIGHTCOLOR 962# ifndef NO_BRIGHTCOLOR
960 PixColors[idx] = PixColors[minBrightCOLOR + i]; 963 PixColorsFocused[idx] = PixColorsFocused[minBrightCOLOR + i];
961 SET_PIXCOLOR (idx); 964 SET_PIXCOLOR (idx);
962 goto Done; 965 goto Done;
963# endif 966# endif
964 967
965 } 968 }
966 if (i >= 0 && i <= 7) 969 if (i >= 0 && i <= 7)
967 { /* normal colors */ 970 { /* normal colors */
968 PixColors[idx] = PixColors[minCOLOR + i]; 971 PixColorsFocused[idx] = PixColorsFocused[minCOLOR + i];
969 SET_PIXCOLOR (idx); 972 SET_PIXCOLOR (idx);
970 goto Done; 973 goto Done;
971 } 974 }
972 } 975 }
973 976
990 XFreeColors (display->display, XCMAP, (PixColors + idx), 1, 993 XFreeColors (display->display, XCMAP, (PixColors + idx), 1,
991 DisplayPlanes (display->display, display->screen)); 994 DisplayPlanes (display->display, display->screen));
992 } 995 }
993# endif 996# endif
994 997
995 PixColors[idx] = xcol; 998 PixColorsFocused[idx] = xcol;
996 SET_PIXCOLOR (idx); 999 SET_PIXCOLOR (idx);
997 1000
998 /* XSetWindowAttributes attr; */ 1001 /* XSetWindowAttributes attr; */
999 /* Cursor cursor; */ 1002 /* Cursor cursor; */
1000Done: 1003Done:
1004#ifdef OFF_FOCUS_FADING
1005 PixColorsUnFocused[idx] = PixColorsFocused[idx].fade (display, atoi (rs[Rs_fade]));
1006#endif
1001 if (idx == Color_bg && ! (Options & Opt_transparent)) 1007 if (idx == Color_bg && ! (Options & Opt_transparent))
1002 XSetWindowBackground (display->display, TermWin.vt, 1008 XSetWindowBackground (display->display, TermWin.vt, PixColors[Color_bg]);
1003 PixColors[Color_bg]);
1004 1009
1005 /* handle Color_BD, scrollbar background, etc. */ 1010 /* handle Color_BD, scrollbar background, etc. */
1006 1011
1007 set_colorfgbg (); 1012 set_colorfgbg ();
1008 recolour_cursor (); 1013 recolour_cursor ();
1016void 1021void
1017rxvt_term::recolour_cursor () 1022rxvt_term::recolour_cursor ()
1018{ 1023{
1019 XColor xcol[2]; 1024 XColor xcol[2];
1020 1025
1021 xcol[0].pixel = ISSET_PIXCOLOR (Color_pointer_fg) ? PixColors[Color_pointer_fg] : PixColors[Color_fg]; 1026 xcol[0].pixel = ISSET_PIXCOLOR (Color_pointer_fg) ? PixColorsFocused[Color_pointer_fg] : PixColorsFocused[Color_fg];
1022 xcol[1].pixel = ISSET_PIXCOLOR (Color_pointer_bg) ? PixColors[Color_pointer_bg] : PixColors[Color_bg]; 1027 xcol[1].pixel = ISSET_PIXCOLOR (Color_pointer_bg) ? PixColorsFocused[Color_pointer_bg] : PixColorsFocused[Color_bg];
1023 XQueryColors (display->display, XCMAP, xcol, 2); 1028 XQueryColors (display->display, XCMAP, xcol, 2);
1024 XRecolorCursor (display->display, TermWin_cursor, xcol + 0, xcol + 1); 1029 XRecolorCursor (display->display, TermWin_cursor, xcol + 0, xcol + 1);
1025} 1030}
1026 1031
1027/*----------------------------------------------------------------------*/ 1032/*----------------------------------------------------------------------*/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines