--- rxvt-unicode/src/main.C 2006/01/30 19:46:13 1.208 +++ rxvt-unicode/src/main.C 2006/01/31 18:36:35 1.212 @@ -370,7 +370,7 @@ (*t)->emergency_cleanup (); } -#if ENABLE_FRILLS +#if !ENABLE_MINIMAL static void print_x_error (Display *dpy, XErrorEvent *event) { @@ -428,10 +428,10 @@ { // GET_R is most likely not the terminal which caused the error, // so just output the error and continue -#if ENABLE_FRILLS - print_x_error (display, event); -#else +#if ENABLE_MINIMAL old_xerror_handler (display, event); +#else + print_x_error (display, event); #endif } @@ -889,10 +889,14 @@ { rxvt_color xcol; int i; - + if (color == NULL || *color == '\0') return; + color = strdup (color); + allocated.push_back ((void *)color); + rs[Rs_color + idx] = color; + /* handle color aliases */ if (isdigit (*color)) { @@ -902,41 +906,24 @@ { /* bright colors */ i -= 8; pix_colors_focused[idx] = pix_colors_focused[minBrightCOLOR + i]; - SET_PIXCOLOR (idx); goto done; } if (i >= 0 && i <= 7) { /* normal colors */ pix_colors_focused[idx] = pix_colors_focused[minCOLOR + i]; - SET_PIXCOLOR (idx); goto done; } } - if (!set_color (xcol, color)) - return; - - /* XStoreColor (xdisp, display->cmap, XColor*); */ + set_color (xcol, color); /* * FIXME: should free colors here, but no idea how to do it so instead, * so just keep gobbling up the colormap */ -# if 0 - for (i = Color_Black; i <= Color_White; i++) - if (pix_colors[idx] == pix_colors[i]) - break; - if (i > Color_White) - { - /* fprintf (stderr, "XFreeColors: pix_colors [%d] = %lu\n", idx, pix_colors [idx]); */ - XFreeColors (xdisp, display->cmap, (pix_colors + idx), 1, - DisplayPlanes (xdisp, display->screen)); - } -# endif pix_colors_focused[idx] = xcol; - SET_PIXCOLOR (idx); /* XSetWindowAttributes attr; */ /* Cursor cursor; */ @@ -944,7 +931,11 @@ #if OFF_FOCUS_FADING if (rs[Rs_fade]) - pix_colors_unfocused[idx] = pix_colors_focused[idx].fade (this, atoi (rs[Rs_fade]), pix_colors[Color_fade]); + { + rgba c; + pix_colors [Color_fade].get (this, c); + pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c); + } #endif /*TODO: handle Color_BD, scrollbar background, etc. */