ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/main.C
(Generate patch)

Comparing rxvt-unicode/src/main.C (file contents):
Revision 1.153 by root, Tue Dec 27 12:23:37 2005 UTC vs.
Revision 1.155 by root, Mon Jan 2 15:35:43 2006 UTC

30 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 30 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
31 *---------------------------------------------------------------------*/ 31 *---------------------------------------------------------------------*/
32 32
33#include "../config.h" /* NECESSARY */ 33#include "../config.h" /* NECESSARY */
34#include "rxvt.h" /* NECESSARY */ 34#include "rxvt.h" /* NECESSARY */
35#include "keyboard.h"
36#include "rxvtperl.h"
35 37
36#include <limits> 38#include <limits>
37 39
38#include <csignal> 40#include <csignal>
39#include <cstring> 41#include <cstring>
42# include <grp.h> 44# include <grp.h>
43#endif 45#endif
44 46
45#ifdef HAVE_TERMIOS_H 47#ifdef HAVE_TERMIOS_H
46# include <termios.h> 48# include <termios.h>
47#endif
48
49#ifdef KEYSYM_RESOURCE
50# include "keyboard.h"
51#endif 49#endif
52 50
53vector<rxvt_term *> rxvt_term::termlist; 51vector<rxvt_term *> rxvt_term::termlist;
54 52
55static char curlocale[128]; 53static char curlocale[128];
195 pty.put (); 193 pty.put ();
196} 194}
197 195
198rxvt_term::~rxvt_term () 196rxvt_term::~rxvt_term ()
199{ 197{
198 PERL_INVOKE ((this, HOOK_DESTROY, DT_END));
199
200 termlist.erase (find (termlist.begin (), termlist.end(), this)); 200 termlist.erase (find (termlist.begin (), termlist.end(), this));
201 201
202 emergency_cleanup (); 202 emergency_cleanup ();
203 203
204#if ENABLE_STYLES 204#if ENABLE_STYLES
293void 293void
294rxvt_term::child_exit () 294rxvt_term::child_exit ()
295{ 295{
296 cmd_pid = 0; 296 cmd_pid = 0;
297 297
298 if (!(options & Opt_hold)) 298 if (!OPTION (Opt_hold))
299 destroy (); 299 destroy ();
300} 300}
301 301
302void 302void
303rxvt_term::destroy () 303rxvt_term::destroy ()
469 469
470#if MENUBAR_MAX 470#if MENUBAR_MAX
471 menubar_read (rs[Rs_menu]); 471 menubar_read (rs[Rs_menu]);
472#endif 472#endif
473#ifdef HAVE_SCROLLBARS 473#ifdef HAVE_SCROLLBARS
474 if (options & Opt_scrollBar) 474 if (OPTION (Opt_scrollBar))
475 scrollBar.setIdle (); /* set existence for size calculations */ 475 scrollBar.setIdle (); /* set existence for size calculations */
476#endif 476#endif
477
478#if ENABLE_PERL
479 rxvt_perl.init ();
480#endif
481
482 PERL_INVOKE ((this, HOOK_INIT, DT_END));
477 483
478 create_windows (argc, argv); 484 create_windows (argc, argv);
479 485
480 dDisp; 486 dDisp;
481 487
486#if 0 492#if 0
487 XSynchronize (disp, True); 493 XSynchronize (disp, True);
488#endif 494#endif
489 495
490#ifdef HAVE_SCROLLBARS 496#ifdef HAVE_SCROLLBARS
491 if (options & Opt_scrollBar) 497 if (OPTION (Opt_scrollBar))
492 resize_scrollbar (); /* create and map scrollbar */ 498 resize_scrollbar (); /* create and map scrollbar */
493#endif 499#endif
494#if (MENUBAR_MAX) 500#if (MENUBAR_MAX)
495 if (menubar_visible ()) 501 if (menubar_visible ())
496 XMapWindow (disp, menuBar.win); 502 XMapWindow (disp, menuBar.win);
497#endif 503#endif
498#ifdef TRANSPARENT 504#ifdef TRANSPARENT
499 if (options & Opt_transparent) 505 if (OPTION (Opt_transparent))
500 { 506 {
501 XSelectInput (disp, display->root, PropertyChangeMask); 507 XSelectInput (disp, display->root, PropertyChangeMask);
502 check_our_parents (); 508 check_our_parents ();
503 rootwin_ev.start (display, display->root); 509 rootwin_ev.start (display, display->root);
504 } 510 }
514 free (cmd_argv); 520 free (cmd_argv);
515 521
516 pty_ev.start (pty.pty, EVENT_READ); 522 pty_ev.start (pty.pty, EVENT_READ);
517 523
518 check_ev.start (); 524 check_ev.start ();
525
526 PERL_INVOKE ((this, HOOK_START, DT_END));
519 527
520 return true; 528 return true;
521} 529}
522 530
523static struct sig_handlers 531static struct sig_handlers
681 689
682#ifdef UTMP_SUPPORT 690#ifdef UTMP_SUPPORT
683void 691void
684rxvt_term::privileged_utmp (rxvt_privaction action) 692rxvt_term::privileged_utmp (rxvt_privaction action)
685{ 693{
686 if ((options & Opt_utmpInhibit) 694 if (OPTION (Opt_utmpInhibit)
687 || !pty.name || !*pty.name) 695 || !pty.name || !*pty.name)
688 return; 696 return;
689 697
690 rxvt_privileges (RESTORE); 698 rxvt_privileges (RESTORE);
691 699
783 791
784 if (scrollbar_visible ()) 792 if (scrollbar_visible ())
785 { 793 {
786 sb_w = scrollbar_TotalWidth (); 794 sb_w = scrollbar_TotalWidth ();
787 szHint.base_width += sb_w; 795 szHint.base_width += sb_w;
788 if (!(options & Opt_scrollBar_right)) 796 if (!OPTION (Opt_scrollBar_right))
789 window_vt_x += sb_w; 797 window_vt_x += sb_w;
790 } 798 }
791 799
792 if (menubar_visible ()) 800 if (menubar_visible ())
793 { 801 {
821 { 829 {
822 min_it (height, max_height); 830 min_it (height, max_height);
823 szHint.height = szHint.base_height + height; 831 szHint.height = szHint.base_height + height;
824 } 832 }
825 833
826 if (scrollbar_visible () && (options & Opt_scrollBar_right)) 834 if (scrollbar_visible () && OPTION (Opt_scrollBar_right))
827 window_sb_x = szHint.width - sb_w; 835 window_sb_x = szHint.width - sb_w;
828 836
829 if (recalc_x) 837 if (recalc_x)
830 szHint.x += DisplayWidth (disp, display->screen) - szHint.width - 2 * ext_bwidth; 838 szHint.x += DisplayWidth (disp, display->screen) - szHint.width - 2 * ext_bwidth;
831 if (recalc_y) 839 if (recalc_y)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines