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.183 by root, Tue Jan 17 10:19:13 2006 UTC vs.
Revision 1.185 by root, Tue Jan 17 15:17:39 2006 UTC

213 213
214#ifdef UTMP_SUPPORT 214#ifdef UTMP_SUPPORT
215 privileged_utmp (RESTORE); 215 privileged_utmp (RESTORE);
216#endif 216#endif
217 217
218 pty.put (); 218 delete pty; pty = 0;
219} 219}
220 220
221rxvt_term::~rxvt_term () 221rxvt_term::~rxvt_term ()
222{ 222{
223 HOOK_INVOKE ((this, HOOK_DESTROY, DT_END)); 223 HOOK_INVOKE ((this, HOOK_DESTROY, DT_END));
509 rxvt_perl.init (this); 509 rxvt_perl.init (this);
510 HOOK_INVOKE ((this, HOOK_INIT, DT_END)); 510 HOOK_INVOKE ((this, HOOK_INIT, DT_END));
511 } 511 }
512#endif 512#endif
513 513
514 pty = rxvt_new_ptytty ();
515
514 create_windows (argc, argv); 516 create_windows (argc, argv);
515 517
516 dDisp; 518 dDisp;
517 519
518 init_xlocale (); 520 init_xlocale ();
543 545
544 init_command (cmd_argv); 546 init_command (cmd_argv);
545 547
546 free (cmd_argv); 548 free (cmd_argv);
547 549
548 if (pty.pty >= 0) 550 if (pty->pty >= 0)
549 pty_ev.start (pty.pty, EVENT_READ); 551 pty_ev.start (pty->pty, EVENT_READ);
550 552
551 check_ev.start (); 553 check_ev.start ();
552 554
553 HOOK_INVOKE ((this, HOOK_START, DT_END)); 555 HOOK_INVOKE ((this, HOOK_START, DT_END));
554 556
713 } 715 }
714# endif 716# endif
715#endif 717#endif
716} 718}
717 719
718#ifdef UTMP_SUPPORT
719void
720rxvt_term::privileged_utmp (rxvt_privaction action)
721{
722 if (OPTION (Opt_utmpInhibit))
723 return;
724
725 rxvt_privileges (RESTORE);
726
727 if (action == SAVE)
728 pty.login (cmd_pid, OPTION (Opt_loginShell), rs[Rs_display_name]);
729 else
730 pty.logout ();
731
732 rxvt_privileges (IGNORE);
733}
734#endif
735
736/*----------------------------------------------------------------------*/ 720/*----------------------------------------------------------------------*/
737/* 721/*
738 * window size/position calculcations for XSizeHint and other storage. 722 * window size/position calculcations for XSizeHint and other storage.
739 * if width/height are non-zero then override calculated width/height 723 * if width/height are non-zero then override calculated width/height
740 */ 724 */
873 * Called after a window size change. 857 * Called after a window size change.
874 */ 858 */
875void 859void
876rxvt_term::tt_winch () 860rxvt_term::tt_winch ()
877{ 861{
878 if (pty.pty < 0) 862 if (pty->pty < 0)
879 return; 863 return;
880 864
881 struct winsize ws; 865 struct winsize ws;
882 866
883 ws.ws_col = ncol; 867 ws.ws_col = ncol;
884 ws.ws_row = nrow; 868 ws.ws_row = nrow;
885 ws.ws_xpixel = width; 869 ws.ws_xpixel = width;
886 ws.ws_ypixel = height; 870 ws.ws_ypixel = height;
887 (void)ioctl (pty.pty, TIOCSWINSZ, &ws); 871 (void)ioctl (pty->pty, TIOCSWINSZ, &ws);
888 872
889#if 0 873#if 0
890 // TIOCSWINSZ⎈ is supposed to do this automatically and correctly 874 // TIOCSWINSZ⎈ is supposed to do this automatically and correctly
891 if (cmd_pid) /* force through to the command */ 875 if (cmd_pid) /* force through to the command */
892 kill (-cmd_pid, SIGWINCH); 876 kill (-cmd_pid, SIGWINCH);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines