--- rxvt-unicode/src/main.C 2005/12/31 17:16:17 1.154 +++ rxvt-unicode/src/main.C 2006/01/04 04:42:45 1.159 @@ -32,6 +32,8 @@ #include "../config.h" /* NECESSARY */ #include "rxvt.h" /* NECESSARY */ +#include "keyboard.h" +#include "rxvtperl.h" #include @@ -46,13 +48,9 @@ # include #endif -#ifdef KEYSYM_RESOURCE -# include "keyboard.h" -#endif - vector rxvt_term::termlist; -static char curlocale[128]; +static char curlocale[128], savelocale[128]; bool rxvt_set_locale (const char *locale) @@ -65,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; @@ -197,6 +208,8 @@ rxvt_term::~rxvt_term () { + PERL_INVOKE ((this, HOOK_DESTROY, DT_END)); + termlist.erase (find (termlist.begin (), termlist.end(), this)); emergency_cleanup (); @@ -475,6 +488,14 @@ scrollBar.setIdle (); /* set existence for size calculations */ #endif +#if ENABLE_PERL + if (rs[Rs_perl_ext] && *rs[Rs_perl_ext]) + { + rxvt_perl.init (); + PERL_INVOKE ((this, HOOK_INIT, DT_END)); + } +#endif + create_windows (argc, argv); dDisp; @@ -517,6 +538,8 @@ check_ev.start (); + PERL_INVOKE ((this, HOOK_START, DT_END)); + return true; } @@ -902,7 +925,7 @@ fwidth = prop.width; fheight = prop.height; - fbase = (*fs)[1]->ascent; + fbase = prop.ascent; for (int style = 1; style < 4; style++) { @@ -1201,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