… | |
… | |
622 | void |
622 | void |
623 | rxvt_init () |
623 | rxvt_init () |
624 | { |
624 | { |
625 | ptytty::init (); |
625 | ptytty::init (); |
626 | |
626 | |
627 | if (!ev::ev_default_loop (0)) |
627 | if (!ev_default_loop (0)) |
628 | rxvt_fatal ("cannot initialise libev (bad value for LIBEV_METHODS?)\n"); |
628 | rxvt_fatal ("cannot initialise libev (bad value for LIBEV_METHODS?)\n"); |
629 | |
629 | |
630 | rxvt_environ = environ; |
630 | rxvt_environ = environ; |
631 | |
631 | |
632 | signal (SIGHUP, SIG_IGN); |
632 | signal (SIGHUP, SIG_IGN); |
633 | signal (SIGPIPE, SIG_IGN); |
633 | signal (SIGPIPE, SIG_IGN); |
634 | |
634 | |
635 | sig_handlers.sw_term.start (SIGTERM); ev::ev_unref (); |
635 | sig_handlers.sw_term.start (SIGTERM); ev_unref (); |
636 | sig_handlers.sw_int.start (SIGINT); ev::ev_unref (); |
636 | sig_handlers.sw_int.start (SIGINT); ev_unref (); |
637 | |
637 | |
638 | /* need to trap SIGURG for SVR4 (Unixware) rlogin */ |
638 | /* need to trap SIGURG for SVR4 (Unixware) rlogin */ |
639 | /* signal (SIGURG, SIG_DFL); */ |
639 | /* signal (SIGURG, SIG_DFL); */ |
640 | |
640 | |
641 | old_xerror_handler = XSetErrorHandler ((XErrorHandler) rxvt_xerror_handler); |
641 | old_xerror_handler = XSetErrorHandler ((XErrorHandler) rxvt_xerror_handler); |
… | |
… | |
979 | if (isdigit (*color)) |
979 | if (isdigit (*color)) |
980 | { |
980 | { |
981 | i = atoi (color); |
981 | i = atoi (color); |
982 | |
982 | |
983 | if (i >= 8 && i <= 15) |
983 | if (i >= 8 && i <= 15) |
|
|
984 | { |
984 | { /* bright colors */ |
985 | /* bright colors */ |
985 | i -= 8; |
986 | i -= 8; |
986 | pix_colors_focused[idx] = pix_colors_focused[minBrightCOLOR + i]; |
987 | pix_colors_focused[idx] = pix_colors_focused[minBrightCOLOR + i]; |
987 | goto done; |
988 | goto done; |
988 | } |
989 | } |
989 | |
990 | |
990 | if (i >= 0 && i <= 7) |
991 | if (i >= 0 && i <= 7) |
|
|
992 | { |
991 | { /* normal colors */ |
993 | /* normal colors */ |
992 | pix_colors_focused[idx] = pix_colors_focused[minCOLOR + i]; |
994 | pix_colors_focused[idx] = pix_colors_focused[minCOLOR + i]; |
993 | goto done; |
995 | goto done; |
994 | } |
996 | } |
995 | } |
997 | } |
996 | |
998 | |
… | |
… | |
1001 | * so just keep gobbling up the colormap |
1003 | * so just keep gobbling up the colormap |
1002 | */ |
1004 | */ |
1003 | |
1005 | |
1004 | pix_colors_focused[idx] = xcol; |
1006 | pix_colors_focused[idx] = xcol; |
1005 | |
1007 | |
1006 | /* XSetWindowAttributes attr; */ |
|
|
1007 | /* Cursor cursor; */ |
|
|
1008 | done: |
1008 | done: |
1009 | /*TODO: handle Color_BD, scrollbar background, etc. */ |
1009 | /*TODO: handle Color_BD, scrollbar background, etc. */ |
1010 | |
1010 | |
1011 | update_fade_color (idx); |
1011 | update_fade_color (idx); |
1012 | recolour_cursor (); |
1012 | recolour_cursor (); |