--- rxvt-unicode/src/main.C 2006/01/02 18:20:23 1.156 +++ rxvt-unicode/src/main.C 2006/01/06 05:37:59 1.164 @@ -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)); @@ -489,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; @@ -532,11 +536,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; } @@ -923,7 +928,7 @@ fwidth = prop.width; fheight = prop.height; - fbase = (*fs)[1]->ascent; + fbase = prop.ascent; for (int style = 1; style < 4; style++) { @@ -1024,11 +1029,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) @@ -1222,11 +1225,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