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.182 by root, Tue Jan 17 10:14:26 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 || !pty.name || !*pty.name)
724 return;
725
726 rxvt_privileges (RESTORE);
727
728 if (action == SAVE)
729 pty.login (cmd_pid, OPTION (Opt_loginShell), rs[Rs_display_name]);
730 else
731 pty.logout ();
732
733 rxvt_privileges (IGNORE);
734}
735#endif
736
737/*----------------------------------------------------------------------*/ 720/*----------------------------------------------------------------------*/
738/* 721/*
739 * window size/position calculcations for XSizeHint and other storage. 722 * window size/position calculcations for XSizeHint and other storage.
740 * if width/height are non-zero then override calculated width/height 723 * if width/height are non-zero then override calculated width/height
741 */ 724 */
874 * Called after a window size change. 857 * Called after a window size change.
875 */ 858 */
876void 859void
877rxvt_term::tt_winch () 860rxvt_term::tt_winch ()
878{ 861{
879 if (pty.pty < 0) 862 if (pty->pty < 0)
880 return; 863 return;
881 864
882 struct winsize ws; 865 struct winsize ws;
883 866
884 ws.ws_col = ncol; 867 ws.ws_col = ncol;
885 ws.ws_row = nrow; 868 ws.ws_row = nrow;
886 ws.ws_xpixel = width; 869 ws.ws_xpixel = width;
887 ws.ws_ypixel = height; 870 ws.ws_ypixel = height;
888 (void)ioctl (pty.pty, TIOCSWINSZ, &ws); 871 (void)ioctl (pty->pty, TIOCSWINSZ, &ws);
889 872
890#if 0 873#if 0
891 // TIOCSWINSZ⎈ is supposed to do this automatically and correctly 874 // TIOCSWINSZ⎈ is supposed to do this automatically and correctly
892 if (cmd_pid) /* force through to the command */ 875 if (cmd_pid) /* force through to the command */
893 kill (-cmd_pid, SIGWINCH); 876 kill (-cmd_pid, SIGWINCH);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines