--- rxvt-unicode/src/main.C 2006/01/02 15:35:43 1.155 +++ rxvt-unicode/src/main.C 2006/01/06 01:16:58 1.162 @@ -50,7 +50,7 @@ vector rxvt_term::termlist; -static char curlocale[128]; +static char curlocale[128], savelocale[128]; bool rxvt_set_locale (const char *locale) @@ -63,6 +63,19 @@ return true; } +bool +rxvt_push_locale (const char *locale) +{ + strcpy (savelocale, curlocale); + rxvt_set_locale (locale); +} + +void +rxvt_pop_locale () +{ + rxvt_set_locale (savelocale); +} + #if ENABLE_COMBINING class rxvt_composite_vec rxvt_composite; @@ -195,7 +208,7 @@ rxvt_term::~rxvt_term () { - PERL_INVOKE ((this, HOOK_DESTROY, DT_END)); + HOOK_INVOKE ((this, HOOK_DESTROY, DT_END)); termlist.erase (find (termlist.begin (), termlist.end(), this)); @@ -476,11 +489,15 @@ #endif #if ENABLE_PERL - rxvt_perl.init (); + if ((rs[Rs_perl_ext_1] && *rs[Rs_perl_ext_1]) + || (rs[Rs_perl_ext_2] && *rs[Rs_perl_ext_2]) + || (rs[Rs_perl_eval] && *rs[Rs_perl_eval])) + { + rxvt_perl.init (); + HOOK_INVOKE ((this, HOOK_INIT, DT_END)); + } #endif - PERL_INVOKE ((this, HOOK_INIT, DT_END)); - create_windows (argc, argv); dDisp; @@ -523,7 +540,7 @@ check_ev.start (); - PERL_INVOKE ((this, HOOK_START, DT_END)); + HOOK_INVOKE ((this, HOOK_START, DT_END)); return true; } @@ -910,7 +927,7 @@ fwidth = prop.width; fheight = prop.height; - fbase = (*fs)[1]->ascent; + fbase = prop.ascent; for (int style = 1; style < 4; style++) { @@ -1011,11 +1028,9 @@ if (i >= 8 && i <= 15) { /* bright colors */ i -= 8; -# ifndef NO_BRIGHTCOLOR pix_colors_focused[idx] = pix_colors_focused[minBrightCOLOR + i]; SET_PIXCOLOR (idx); goto done; -# endif } if (i >= 0 && i <= 7) @@ -1209,11 +1224,11 @@ if (menubar_visible ()) XMoveResizeWindow (disp, menuBar.win, window_vt_x, 0, - TermWin_TotalWidth (), menuBar_TotalHeight ()); + width, menuBar_TotalHeight ()); XMoveResizeWindow (disp, vt, window_vt_x, window_vt_y, - TermWin_TotalWidth (), TermWin_TotalHeight ()); + width, height); scr_clear (); #ifdef XPM_BACKGROUND