--- rxvt-unicode/src/main.C 2006/01/04 05:35:34 1.160 +++ rxvt-unicode/src/main.C 2006/01/08 07:55:36 1.166 @@ -13,7 +13,7 @@ * Copyright (c) 1997,1998 Oezguer Kesim * Copyright (c) 1998-2001 Geoff Wing * - extensive modifications - * Copyright (c) 2003-2004 Marc Lehmann + * Copyright (c) 2003-2006 Marc Lehmann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -208,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)); @@ -276,6 +276,9 @@ #if OFF_FOCUS_FADING delete pix_colors_unfocused; #endif +#if USE_XGETDEFAULT + XrmDestroyDatabase (xrmdatabase); +#endif displays.put (display); @@ -489,12 +492,15 @@ #endif #if ENABLE_PERL + if (!rs[Rs_perl_ext_1]) + rs[Rs_perl_ext_1] = "default"; + 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 (); - PERL_INVOKE ((this, HOOK_INIT, DT_END)); + HOOK_INVOKE ((this, HOOK_INIT, DT_END)); } #endif @@ -536,11 +542,12 @@ free (cmd_argv); - pty_ev.start (pty.pty, EVENT_READ); + if (pty.pty >= 0) + pty_ev.start (pty.pty, EVENT_READ); check_ev.start (); - PERL_INVOKE ((this, HOOK_START, DT_END)); + HOOK_INVOKE ((this, HOOK_START, DT_END)); return true; } @@ -611,6 +618,10 @@ old_xerror_handler = XSetErrorHandler ((XErrorHandler) rxvt_xerror_handler); // TODO: handle this with exceptions and tolerate the memory loss XSetIOErrorHandler (rxvt_xioerror_handler); + +#ifdef USE_XGETDEFAULT + XrmInitialize (); +#endif } /* ------------------------------------------------------------------------- * @@ -1028,11 +1039,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)