--- rxvt-unicode/src/main.C 2006/01/31 18:36:35 1.212 +++ rxvt-unicode/src/main.C 2006/02/02 18:00:23 1.217 @@ -254,10 +254,18 @@ if (parent[0]) XDestroyWindow (xdisp, parent[0]); + for (int i = 0; i < TOTAL_COLORS; i++) + if (ISSET_PIXCOLOR (i)) + { + pix_colors_focused [i].free (this); +#if OFF_FOCUS_FADING + pix_colors_unfocused [i].free (this); +#endif + } + clear (); } - // TODO: free pixcolours, colours should become part of rxvt_display delete pix_colors_focused; #if OFF_FOCUS_FADING delete pix_colors_unfocused; @@ -693,6 +701,7 @@ { sb_w = scrollbar_TotalWidth (); szHint.base_width += sb_w; + if (!OPTION (Opt_scrollBar_right)) window_vt_x += sb_w; } @@ -933,7 +942,7 @@ if (rs[Rs_fade]) { rgba c; - pix_colors [Color_fade].get (this, c); + pix_colors [Color_fade].get (c); pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c); } #endif @@ -951,17 +960,17 @@ void rxvt_term::recolour_cursor () { - XColor xcol[2]; + XColor fg, bg; + + (ISSET_PIXCOLOR (Color_pointer_fg) + ? pix_colors_focused[Color_pointer_fg] + : pix_colors_focused[Color_fg]).get (fg); - xcol[0].pixel = ISSET_PIXCOLOR (Color_pointer_fg) - ? pix_colors_focused[Color_pointer_fg] - : pix_colors_focused[Color_fg]; - xcol[1].pixel = ISSET_PIXCOLOR (Color_pointer_bg) - ? pix_colors_focused[Color_pointer_bg] - : pix_colors_focused[Color_bg]; + (ISSET_PIXCOLOR (Color_pointer_bg) + ? pix_colors_focused[Color_pointer_bg] + : pix_colors_focused[Color_bg]).get (bg); - XQueryColors (xdisp, cmap, xcol, 2); - XRecolorCursor (xdisp, TermWin_cursor, xcol + 0, xcol + 1); + XRecolorCursor (xdisp, TermWin_cursor, &fg, &bg); } /*----------------------------------------------------------------------*/ @@ -1009,6 +1018,12 @@ return false; } +void +rxvt_term::alias_color (int dst, int src) +{ + pix_colors[dst].set (this, rs[Rs_color + dst] = rs[Rs_color + src]); +} + /* -------------------------------------------------------------------- * * - WINDOW RESIZING - * * -------------------------------------------------------------------- */ @@ -1095,6 +1110,9 @@ if (fix_screen || old_height == 0) scr_reset (); + // TODO, with nvidia-8178, resizes kill the alpha channel, report if not fixed in newer version + //scr_touch (false); + #ifdef XPM_BACKGROUND if (pixmap) scr_touch (false); @@ -1140,8 +1158,8 @@ void rxvt_term::im_set_color (unsigned long &fg, unsigned long &bg) { - fg = pix_colors[Color_fg]; - bg = pix_colors[Color_bg]; + fg = pix_colors [Color_fg]; + bg = pix_colors [Color_bg]; } void