--- rxvt-unicode/src/main.C 2006/07/28 17:16:42 1.227 +++ rxvt-unicode/src/main.C 2007/06/23 18:29:08 1.236 @@ -58,15 +58,15 @@ bool rxvt_set_locale (const char *locale) NOTHROW { - int len = strlen (locale) + 1; + int size = strlen (locale) + 1; - if (len > sizeof (curlocale)) + if (size > sizeof (curlocale)) rxvt_fatal ("locale string too long, aborting.\n"); - if (!locale || !memcmp (locale, curlocale, len)) + if (!locale || !memcmp (locale, curlocale, size)) return false; - memcpy (curlocale, locale, len); + memcpy (curlocale, locale, size); setlocale (LC_CTYPE, curlocale); return true; } @@ -153,6 +153,9 @@ #if TRANSPARENT || ENABLE_PERL rootwin_ev (this, &rxvt_term::rootwin_cb), #endif +#if TRANSPARENT + check_our_parents_ev(this, &rxvt_term::check_our_parents_cb), +#endif #ifdef HAVE_SCROLLBARS scrollbar_ev (this, &rxvt_term::x_cb), #endif @@ -272,9 +275,9 @@ clear (); } - delete pix_colors_focused; + delete [] pix_colors_focused; #if OFF_FOCUS_FADING - delete pix_colors_unfocused; + delete [] pix_colors_unfocused; #endif displays.put (display); @@ -309,7 +312,7 @@ cmd_pid = 0; - if (!OPTION (Opt_hold)) + if (!option (Opt_hold)) destroy (); } @@ -483,7 +486,7 @@ #endif #ifdef HAVE_SCROLLBARS - if (OPTION (Opt_scrollBar)) + if (option (Opt_scrollBar)) scrollBar.setIdle (); /* set existence for size calculations */ #endif @@ -500,11 +503,11 @@ #endif #ifdef HAVE_SCROLLBARS - if (OPTION (Opt_scrollBar)) + if (option (Opt_scrollBar)) resize_scrollbar (); /* create and map scrollbar */ #endif #ifdef TRANSPARENT - if (OPTION (Opt_transparent)) + if (option (Opt_transparent)) { XSelectInput (dpy, display->root, PropertyChangeMask); check_our_parents (); @@ -629,7 +632,7 @@ /*----------------------------------------------------------------------*/ /* - * window size/position calculcations for XSizeHint and other storage. + * window size/position calculations for XSizeHint and other storage. * if width/height are non-zero then override calculated width/height */ void @@ -711,7 +714,7 @@ sb_w = scrollbar_TotalWidth (); szHint.base_width += sb_w; - if (!OPTION (Opt_scrollBar_right)) + if (!option (Opt_scrollBar_right)) window_vt_x += sb_w; } @@ -742,7 +745,7 @@ szHint.height = szHint.base_height + height; } - if (scrollBar.state && OPTION (Opt_scrollBar_right)) + if (scrollBar.state && option (Opt_scrollBar_right)) window_sb_x = szHint.width - sb_w; if (recalc_x) @@ -814,7 +817,8 @@ prop = (*fs)[1]->properties (); prop.height += lineSpace; - fs->set_prop (prop); + + fs->set_prop (prop, false); fwidth = prop.width; fheight = prop.height; @@ -833,17 +837,20 @@ rxvt_fontprop prop2 = prop; if (res) - prop2.weight = prop2.slant = rxvt_fontprop::unset; + { + fs->populate (res); + fs->set_prop (prop2, false); + } else { - res = fontset[0]->fontdesc; + fs->populate (fontset[0]->fontdesc); if (SET_STYLE (0, style) & RS_Bold) prop2.weight = rxvt_fontprop::bold; if (SET_STYLE (0, style) & RS_Italic) prop2.slant = rxvt_fontprop::italic; + + fs->set_prop (prop2, true); } - fs->populate (res); - fs->set_prop (prop2); } #else fontset[style] = fontset[0];