--- rxvt-unicode/src/main.C 2007/12/04 16:24:00 1.270 +++ rxvt-unicode/src/main.C 2007/12/14 05:25:25 1.283 @@ -13,7 +13,7 @@ * Copyright (c) 1997,1998 Oezguer Kesim * Copyright (c) 1998-2001 Geoff Wing * - extensive modifications - * Copyright (c) 2003-2006 Marc Lehmann + * Copyright (c) 2003-2007 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 @@ -40,9 +40,7 @@ #include #include -#ifdef HAVE_TERMIOS_H -# include -#endif +#include #ifdef HAVE_XSETLOCALE # define X_LOCALE @@ -159,10 +157,10 @@ update_background_ev.set (this); #endif #ifdef CURSOR_BLINK - cursor_blink_ev.set (this); + cursor_blink_ev.set (this); cursor_blink_ev.set (0., CURSOR_BLINK_INTERVAL); #endif #ifdef TEXT_BLINK - text_blink_ev.set (this); + text_blink_ev.set (this); text_blink_ev.set (0., TEXT_BLINK_INTERVAL); #endif #ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING cont_scroll_ev.set (this); @@ -189,7 +187,6 @@ bell_ev.set (this); #endif child_ev.set (this); - prepare_ev.set (this); flush_ev.set (this); destroy_ev.set (this); pty_ev.set (this); @@ -331,7 +328,7 @@ void rxvt_term::destroy () { - if (destroy_ev.active) + if (destroy_ev.is_active ()) return; HOOK_INVOKE ((this, HOOK_DESTROY, DT_END)); @@ -356,7 +353,7 @@ vt_ev.stop (display); } - prepare_ev.stop (); + flush_ev.stop (); pty_ev.stop (); #ifdef CURSOR_BLINK cursor_blink_ev.stop (); @@ -477,7 +474,7 @@ } /*----------------------------------------------------------------------*/ -bool +void rxvt_term::init (int argc, const char *const *argv, stringvec *envv) { this->envv = envv; @@ -486,8 +483,7 @@ set_locale (""); set_environ (envv); // few things in X do not call setlocale :( - if (!init_vars ()) - return false; + init_vars (); init_secondary (); @@ -575,8 +571,6 @@ if (pty->pty >= 0) pty_ev.start (pty->pty, ev::READ); - prepare_ev.start (); - HOOK_INVOKE ((this, HOOK_START, DT_END)); #if ENABLE_XEMBED @@ -591,8 +585,6 @@ XMapWindow (dpy, vt); XMapWindow (dpy, parent[0]); - - return true; } static struct sig_handlers @@ -602,13 +594,7 @@ /* * Catch a fatal signal and tidy up before quitting */ - void - sig_term (ev::sig &w, int revents) - { - rxvt_emergency_cleanup (); - w.stop (); - kill (getpid (), w.signum); - } + void sig_term (ev::sig &w, int revents); sig_handlers () { @@ -617,6 +603,14 @@ } } sig_handlers; +void +sig_handlers::sig_term (ev::sig &w, int revents) +{ + rxvt_emergency_cleanup (); + w.stop (); + kill (getpid (), w.signum); +} + char **rxvt_environ; // startup environment void @@ -829,7 +823,7 @@ (void)ioctl (pty->pty, TIOCSWINSZ, &ws); #if 0 - // TIOCSWINSZ⎈ is supposed to do this automatically and correctly + // TIOCSWINSZ is supposed to do this automatically and correctly if (cmd_pid) /* force through to the command */ kill (-cmd_pid, SIGWINCH); #endif