--- rxvt-unicode/src/main.C 2005/12/31 17:16:17 1.154 +++ rxvt-unicode/src/main.C 2006/01/02 18:20:23 1.156 @@ -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,12 @@ scrollBar.setIdle (); /* set existence for size calculations */ #endif +#if ENABLE_PERL + rxvt_perl.init (); +#endif + + PERL_INVOKE ((this, HOOK_INIT, DT_END)); + create_windows (argc, argv); dDisp; @@ -517,6 +536,8 @@ check_ev.start (); + PERL_INVOKE ((this, HOOK_START, DT_END)); + return true; }