… | |
… | |
485 | # else |
485 | # else |
486 | rs[Rs_delete_key] = "\033[3~"; |
486 | rs[Rs_delete_key] = "\033[3~"; |
487 | # endif |
487 | # endif |
488 | #endif |
488 | #endif |
489 | |
489 | |
490 | setup_scrollbar (rs[Rs_scrollBar_align], rs[Rs_scrollstyle], rs[Rs_scrollBar_thickness]); |
490 | scrollBar.setup (this); |
491 | |
491 | |
492 | #ifdef XTERM_REVERSE_VIDEO |
492 | #ifdef XTERM_REVERSE_VIDEO |
493 | /* this is how xterm implements reverseVideo */ |
493 | /* this is how xterm implements reverseVideo */ |
494 | if (option (Opt_reverseVideo)) |
494 | if (option (Opt_reverseVideo)) |
495 | { |
495 | { |
… | |
… | |
539 | { |
539 | { |
540 | this->envv = envv; |
540 | this->envv = envv; |
541 | |
541 | |
542 | SET_R (this); |
542 | SET_R (this); |
543 | set_locale (""); |
543 | set_locale (""); |
544 | set_environ (envv); // few things in X do not call setlocale :( |
544 | set_environ (envv); // a few things in X do not call setlocale :( |
545 | |
545 | |
546 | init_vars (); |
546 | init_vars (); |
547 | |
547 | |
548 | init_secondary (); |
548 | init_secondary (); |
549 | |
549 | |
… | |
… | |
551 | |
551 | |
552 | #ifdef KEYSYM_RESOURCE |
552 | #ifdef KEYSYM_RESOURCE |
553 | keyboard->register_done (); |
553 | keyboard->register_done (); |
554 | #endif |
554 | #endif |
555 | |
555 | |
|
|
556 | if (const char *path = rs[Rs_chdir]) |
|
|
557 | if (*path) // ignored if empty |
|
|
558 | { |
|
|
559 | if (*path != '/') |
|
|
560 | rxvt_fatal ("specified shell working directory must start with a slash, aborting.\n"); |
|
|
561 | |
|
|
562 | if (chdir (path)) |
|
|
563 | rxvt_fatal ("unable to change into specified shell working directory, aborting.\n"); |
|
|
564 | } |
|
|
565 | |
556 | if (option (Opt_scrollBar)) |
566 | if (option (Opt_scrollBar)) |
557 | scrollBar.state = STATE_IDLE; /* set existence for size calculations */ |
567 | scrollBar.state = STATE_IDLE; /* set existence for size calculations */ |
558 | |
568 | |
559 | pty = ptytty::create (); |
569 | pty = ptytty::create (); |
560 | |
570 | |
… | |
… | |
567 | #if 0 |
577 | #if 0 |
568 | XSynchronize (dpy, True); |
578 | XSynchronize (dpy, True); |
569 | #endif |
579 | #endif |
570 | |
580 | |
571 | if (option (Opt_scrollBar)) |
581 | if (option (Opt_scrollBar)) |
572 | resize_scrollbar (); /* create and map scrollbar */ |
582 | scrollBar.resize (); /* create and map scrollbar */ |
573 | #ifdef HAVE_BG_PIXMAP |
583 | #ifdef HAVE_BG_PIXMAP |
574 | { |
584 | { |
575 | bgPixmap.set_target (this); |
585 | bgPixmap.set_target (this); |
576 | bgPixmap.invalidate (); |
586 | bgPixmap.invalidate (); |
577 | |
587 | |
… | |
… | |
832 | run_command (argv); |
842 | run_command (argv); |
833 | } |
843 | } |
834 | |
844 | |
835 | /*----------------------------------------------------------------------*/ |
845 | /*----------------------------------------------------------------------*/ |
836 | void |
846 | void |
837 | rxvt_term::Get_Colours () |
847 | rxvt_term::get_colours () |
838 | { |
848 | { |
839 | int i; |
849 | int i; |
840 | |
850 | |
841 | #ifdef OFF_FOCUS_FADING |
851 | #ifdef OFF_FOCUS_FADING |
842 | pix_colors = pix_colors_focused; |
852 | pix_colors = pix_colors_focused; |
… | |
… | |
1059 | Window top, parent; |
1069 | Window top, parent; |
1060 | |
1070 | |
1061 | dLocal (Display *, dpy); |
1071 | dLocal (Display *, dpy); |
1062 | |
1072 | |
1063 | /* grab colors before netscape does */ |
1073 | /* grab colors before netscape does */ |
1064 | Get_Colours (); |
1074 | get_colours (); |
1065 | |
1075 | |
1066 | if (!set_fonts ()) |
1076 | if (!set_fonts ()) |
1067 | rxvt_fatal ("unable to load base fontset, please specify a valid one using -fn, aborting.\n"); |
1077 | rxvt_fatal ("unable to load base fontset, please specify a valid one using -fn, aborting.\n"); |
1068 | |
1078 | |
1069 | parent = display->root; |
1079 | parent = display->root; |
… | |
… | |
1524 | signal (SIGTSTP, SIG_IGN); |
1534 | signal (SIGTSTP, SIG_IGN); |
1525 | signal (SIGTTIN, SIG_IGN); |
1535 | signal (SIGTTIN, SIG_IGN); |
1526 | signal (SIGTTOU, SIG_IGN); |
1536 | signal (SIGTTOU, SIG_IGN); |
1527 | #endif /* SIGTSTP */ |
1537 | #endif /* SIGTSTP */ |
1528 | |
1538 | |
1529 | // unblock signals (signals are blocked by iom.C |
|
|
1530 | sigset_t ss; |
|
|
1531 | sigemptyset (&ss); |
|
|
1532 | sigprocmask (SIG_SETMASK, &ss, 0); |
|
|
1533 | |
|
|
1534 | /* command interpreter path */ |
1539 | /* command interpreter path */ |
1535 | if (argv) |
1540 | if (argv) |
1536 | { |
1541 | { |
1537 | # ifdef DEBUG_CMD |
1542 | # ifdef DEBUG_CMD |
1538 | int i; |
1543 | int i; |