--- rxvt-unicode/src/main.C 2006/01/06 01:16:58 1.162 +++ 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 @@ -276,6 +276,9 @@ #if OFF_FOCUS_FADING delete pix_colors_unfocused; #endif +#if USE_XGETDEFAULT + XrmDestroyDatabase (xrmdatabase); +#endif displays.put (display); @@ -489,6 +492,9 @@ #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])) @@ -536,7 +542,8 @@ free (cmd_argv); - pty_ev.start (pty.pty, EVENT_READ); + if (pty.pty >= 0) + pty_ev.start (pty.pty, EVENT_READ); check_ev.start (); @@ -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 } /* ------------------------------------------------------------------------- *