… | |
… | |
267 | NULL, // Color_underline |
267 | NULL, // Color_underline |
268 | #endif |
268 | #endif |
269 | #ifdef OPTION_HC |
269 | #ifdef OPTION_HC |
270 | NULL, |
270 | NULL, |
271 | #endif |
271 | #endif |
272 | #ifdef KEEP_SCROLLCOLOR |
|
|
273 | COLOR_SCROLLBAR, |
272 | COLOR_SCROLLBAR, |
|
|
273 | #ifdef RXVT_SCROLLBAR |
274 | COLOR_SCROLLTROUGH, |
274 | COLOR_SCROLLTROUGH, |
275 | #endif /* KEEP_SCROLLCOLOR */ |
275 | #endif |
276 | #if ENABLE_TRANSPARENCY |
276 | #if ENABLE_TRANSPARENCY |
277 | NULL, |
277 | NULL, |
278 | #endif |
278 | #endif |
279 | #if OFF_FOCUS_FADING |
279 | #if OFF_FOCUS_FADING |
280 | "rgb:00/00/00", |
280 | "rgb:00/00/00", |
… | |
… | |
308 | set_option (Opt_secondaryScreen); |
308 | set_option (Opt_secondaryScreen); |
309 | set_option (Opt_secondaryScroll); |
309 | set_option (Opt_secondaryScroll); |
310 | set_option (Opt_pastableTabs); |
310 | set_option (Opt_pastableTabs); |
311 | set_option (Opt_intensityStyles); |
311 | set_option (Opt_intensityStyles); |
312 | set_option (Opt_iso14755_52); |
312 | set_option (Opt_iso14755_52); |
|
|
313 | set_option (Opt_buffered); |
313 | } |
314 | } |
314 | |
315 | |
315 | static void |
316 | static void |
316 | init_secondary () |
317 | init_secondary () |
317 | { |
318 | { |
… | |
… | |
484 | # else |
485 | # else |
485 | rs[Rs_delete_key] = "\033[3~"; |
486 | rs[Rs_delete_key] = "\033[3~"; |
486 | # endif |
487 | # endif |
487 | #endif |
488 | #endif |
488 | |
489 | |
489 | #ifdef HAVE_SCROLLBARS |
490 | scrollBar.setup (this); |
490 | setup_scrollbar (rs[Rs_scrollBar_align], rs[Rs_scrollstyle], rs[Rs_scrollBar_thickness]); |
|
|
491 | #endif |
|
|
492 | |
491 | |
493 | #ifdef XTERM_REVERSE_VIDEO |
492 | #ifdef XTERM_REVERSE_VIDEO |
494 | /* this is how xterm implements reverseVideo */ |
493 | /* this is how xterm implements reverseVideo */ |
495 | if (option (Opt_reverseVideo)) |
494 | if (option (Opt_reverseVideo)) |
496 | { |
495 | { |
… | |
… | |
540 | { |
539 | { |
541 | this->envv = envv; |
540 | this->envv = envv; |
542 | |
541 | |
543 | SET_R (this); |
542 | SET_R (this); |
544 | set_locale (""); |
543 | set_locale (""); |
545 | set_environ (envv); // few things in X do not call setlocale :( |
544 | set_environ (envv); // a few things in X do not call setlocale :( |
546 | |
545 | |
547 | init_vars (); |
546 | init_vars (); |
548 | |
547 | |
549 | init_secondary (); |
548 | init_secondary (); |
550 | |
549 | |
… | |
… | |
552 | |
551 | |
553 | #ifdef KEYSYM_RESOURCE |
552 | #ifdef KEYSYM_RESOURCE |
554 | keyboard->register_done (); |
553 | keyboard->register_done (); |
555 | #endif |
554 | #endif |
556 | |
555 | |
557 | #ifdef HAVE_SCROLLBARS |
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 | |
558 | if (option (Opt_scrollBar)) |
566 | if (option (Opt_scrollBar)) |
559 | scrollBar.setIdle (); /* set existence for size calculations */ |
567 | scrollBar.state = STATE_IDLE; /* set existence for size calculations */ |
560 | #endif |
|
|
561 | |
568 | |
562 | pty = ptytty::create (); |
569 | pty = ptytty::create (); |
563 | |
570 | |
564 | create_windows (argc, argv); |
571 | create_windows (argc, argv); |
565 | |
572 | |
… | |
… | |
569 | |
576 | |
570 | #if 0 |
577 | #if 0 |
571 | XSynchronize (dpy, True); |
578 | XSynchronize (dpy, True); |
572 | #endif |
579 | #endif |
573 | |
580 | |
574 | #ifdef HAVE_SCROLLBARS |
|
|
575 | if (option (Opt_scrollBar)) |
581 | if (option (Opt_scrollBar)) |
576 | resize_scrollbar (); /* create and map scrollbar */ |
582 | scrollBar.resize (); /* create and map scrollbar */ |
577 | #endif |
|
|
578 | #ifdef HAVE_BG_PIXMAP |
583 | #ifdef HAVE_BG_PIXMAP |
579 | { |
584 | { |
580 | bgPixmap.set_target (this); |
585 | bgPixmap.set_target (this); |
581 | bgPixmap.invalidate (); |
586 | bgPixmap.invalidate (); |
582 | |
587 | |
… | |
… | |
837 | run_command (argv); |
842 | run_command (argv); |
838 | } |
843 | } |
839 | |
844 | |
840 | /*----------------------------------------------------------------------*/ |
845 | /*----------------------------------------------------------------------*/ |
841 | void |
846 | void |
842 | rxvt_term::Get_Colours () |
847 | rxvt_term::get_colours () |
843 | { |
848 | { |
844 | int i; |
849 | int i; |
845 | |
850 | |
846 | #ifdef OFF_FOCUS_FADING |
851 | #ifdef OFF_FOCUS_FADING |
847 | pix_colors = pix_colors_focused; |
852 | pix_colors = pix_colors_focused; |
… | |
… | |
907 | * get scrollBar shadow colors |
912 | * get scrollBar shadow colors |
908 | * |
913 | * |
909 | * The calculations of topShadow/bottomShadow values are adapted |
914 | * The calculations of topShadow/bottomShadow values are adapted |
910 | * from the fvwm window manager. |
915 | * from the fvwm window manager. |
911 | */ |
916 | */ |
912 | #ifdef KEEP_SCROLLCOLOR |
917 | #ifdef RXVT_SCROLLBAR |
913 | if (depth <= 2) |
918 | if (depth <= 2) |
914 | { |
919 | { |
915 | /* Monochrome */ |
920 | /* Monochrome */ |
916 | alias_color (Color_scroll, Color_fg); |
921 | alias_color (Color_scroll, Color_fg); |
917 | alias_color (Color_topShadow, Color_bg); |
922 | alias_color (Color_topShadow, Color_bg); |
… | |
… | |
932 | min ((int)rgba::MAX_CC, max (cscroll.b / 5, cscroll.b) * 7 / 5), |
937 | min ((int)rgba::MAX_CC, max (cscroll.b / 5, cscroll.b) * 7 / 5), |
933 | cscroll.a) |
938 | cscroll.a) |
934 | )) |
939 | )) |
935 | alias_color (Color_topShadow, Color_White); |
940 | alias_color (Color_topShadow, Color_White); |
936 | } |
941 | } |
937 | #endif /* KEEP_SCROLLCOLOR */ |
942 | #endif |
938 | |
943 | |
939 | #ifdef OFF_FOCUS_FADING |
944 | #ifdef OFF_FOCUS_FADING |
940 | for (i = 0; i < (depth <= 2 ? 2 : NRS_COLORS); i++) |
945 | for (i = 0; i < (depth <= 2 ? 2 : NRS_COLORS); i++) |
941 | update_fade_color (i); |
946 | update_fade_color (i); |
942 | #endif |
947 | #endif |
… | |
… | |
1064 | Window top, parent; |
1069 | Window top, parent; |
1065 | |
1070 | |
1066 | dLocal (Display *, dpy); |
1071 | dLocal (Display *, dpy); |
1067 | |
1072 | |
1068 | /* grab colors before netscape does */ |
1073 | /* grab colors before netscape does */ |
1069 | Get_Colours (); |
1074 | get_colours (); |
1070 | |
1075 | |
1071 | if (!set_fonts ()) |
1076 | if (!set_fonts ()) |
1072 | 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"); |
1073 | |
1078 | |
1074 | parent = display->root; |
1079 | parent = display->root; |
… | |
… | |
1529 | signal (SIGTSTP, SIG_IGN); |
1534 | signal (SIGTSTP, SIG_IGN); |
1530 | signal (SIGTTIN, SIG_IGN); |
1535 | signal (SIGTTIN, SIG_IGN); |
1531 | signal (SIGTTOU, SIG_IGN); |
1536 | signal (SIGTTOU, SIG_IGN); |
1532 | #endif /* SIGTSTP */ |
1537 | #endif /* SIGTSTP */ |
1533 | |
1538 | |
1534 | // unblock signals (signals are blocked by iom.C |
|
|
1535 | sigset_t ss; |
|
|
1536 | sigemptyset (&ss); |
|
|
1537 | sigprocmask (SIG_SETMASK, &ss, 0); |
|
|
1538 | |
|
|
1539 | /* command interpreter path */ |
1539 | /* command interpreter path */ |
1540 | if (argv) |
1540 | if (argv) |
1541 | { |
1541 | { |
1542 | # ifdef DEBUG_CMD |
1542 | # ifdef DEBUG_CMD |
1543 | int i; |
1543 | int i; |