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

Comparing rxvt-unicode/src/init.C (file contents):
Revision 1.109 by root, Mon Feb 14 18:47:54 2005 UTC vs.
Revision 1.111 by root, Thu Feb 17 20:52:48 2005 UTC

225 225
226 MEvent.time = CurrentTime; 226 MEvent.time = CurrentTime;
227 MEvent.button = AnyButton; 227 MEvent.button = AnyButton;
228 options = DEFAULT_OPTIONS; 228 options = DEFAULT_OPTIONS;
229 want_refresh = 1; 229 want_refresh = 1;
230 cmd_pid = -1;
231 pty.pty = pty.tty = -1;
232 priv_modes = SavedModes = PrivMode_Default; 230 priv_modes = SavedModes = PrivMode_Default;
233 TermWin.focus = 0; 231 TermWin.focus = 0;
234 TermWin.ncol = 80; 232 TermWin.ncol = 80;
235 TermWin.nrow = 24; 233 TermWin.nrow = 24;
236 TermWin.int_bwidth = INTERNALBORDERWIDTH; 234 TermWin.int_bwidth = INTERNALBORDERWIDTH;
673 if (scrollbar_visible ()) 671 if (scrollbar_visible ())
674 { 672 {
675 priv_modes |= PrivMode_scrollBar; 673 priv_modes |= PrivMode_scrollBar;
676 SavedModes |= PrivMode_scrollBar; 674 SavedModes |= PrivMode_scrollBar;
677 } 675 }
676
678 if (menubar_visible ()) 677 if (menubar_visible ())
679 { 678 {
680 priv_modes |= PrivMode_menuBar; 679 priv_modes |= PrivMode_menuBar;
681 SavedModes |= PrivMode_menuBar; 680 SavedModes |= PrivMode_menuBar;
682 } 681 }
977 rxvt_fatal ("unable to load base fontset, please specify a valid one using -fn, aborting.\n"); 976 rxvt_fatal ("unable to load base fontset, please specify a valid one using -fn, aborting.\n");
978 977
979#if ENABLE_FRILLS 978#if ENABLE_FRILLS
980 if (rs[Rs_embed]) 979 if (rs[Rs_embed])
981 { 980 {
981 XWindowAttributes wattr;
982
982 top = strtol (rs[Rs_embed], 0, 0); 983 top = strtol (rs[Rs_embed], 0, 0);
983 984
984 XWindowAttributes wattr;
985 XGetWindowAttributes (disp, top, &wattr); 985 if (!XGetWindowAttributes (disp, top, &wattr))
986 rxvt_fatal ("invalid window-id specified with -embed, aborting.\n");
986 987
987 window_calc (wattr.width, wattr.height); 988 window_calc (wattr.width, wattr.height);
988 989
989#if 0 990#if 0
990 if (wattr.map_state == IsViewable) 991 if (wattr.map_state == IsViewable)
1417 * the slave. 1418 * the slave.
1418 */ 1419 */
1419void 1420void
1420rxvt_term::run_command (const char *const *argv) 1421rxvt_term::run_command (const char *const *argv)
1421{ 1422{
1423#if ENABLE_FRILLS
1424 if (rs[Rs_pty_fd])
1425 {
1426 pty.pty = atoi (rs[Rs_pty_fd]);
1427 fcntl (pty.pty, F_SETFL, O_NONBLOCK);
1428 }
1429 else
1430#endif
1422 if (!pty.get ()) 1431 if (!pty.get ())
1423 rxvt_fatal ("can't initialize pseudo-tty, aborting.\n"); 1432 rxvt_fatal ("can't initialize pseudo-tty, aborting.\n");
1424 1433
1425 pty.set_utf8_mode (enc_utf8); 1434 pty.set_utf8_mode (enc_utf8);
1426 1435
1427 /* set initial window size */ 1436 /* set initial window size */
1428 tt_winch (); 1437 tt_winch ();
1438#endif 1447#endif
1439 er = -1; 1448 er = -1;
1440 1449
1441 rxvt_get_ttymode (&tio, er); 1450 rxvt_get_ttymode (&tio, er);
1442 1451
1452#if ENABLE_FRILLS
1453 if (rs[Rs_pty_fd])
1454 return;
1455#endif
1456
1443 sw_chld.start (SIGCHLD); 1457 sw_chld.start (SIGCHLD);
1444 1458
1445#ifndef __QNX__ 1459#ifndef __QNX__
1446 /* spin off the command interpreter */ 1460 /* spin off the command interpreter */
1447 switch (cmd_pid = fork ()) 1461 switch (cmd_pid = fork ())
1448 { 1462 {
1449 case -1: 1463 case -1:
1464 {
1465 cmd_pid = 0;
1450 rxvt_fatal ("can't fork, aborting.\n"); 1466 rxvt_fatal ("can't fork, aborting.\n");
1467 }
1451 case 0: 1468 case 0:
1452 init_env (); 1469 init_env ();
1453 1470
1454 if (!pty.make_controlling_tty ()) 1471 if (!pty.make_controlling_tty ())
1455 fprintf (stderr, "%s: could not obtain control of tty.", RESNAME); 1472 fprintf (stderr, "%s: could not obtain control of tty.", RESNAME);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines