… | |
… | |
284 | delete [] pix_colors_focused; |
284 | delete [] pix_colors_focused; |
285 | #if OFF_FOCUS_FADING |
285 | #if OFF_FOCUS_FADING |
286 | delete [] pix_colors_unfocused; |
286 | delete [] pix_colors_unfocused; |
287 | #endif |
287 | #endif |
288 | |
288 | |
|
|
289 | #ifdef HAVE_BG_PIXMAP |
289 | bgPixmap.destroy (); |
290 | bgPixmap.destroy (); |
|
|
291 | #endif |
290 | displays.put (display); |
292 | displays.put (display); |
291 | |
293 | |
292 | scr_release (); |
294 | scr_release (); |
293 | |
295 | |
294 | /* clear all resources */ |
296 | /* clear all resources */ |
… | |
… | |
306 | delete envv; |
308 | delete envv; |
307 | delete argv; |
309 | delete argv; |
308 | |
310 | |
309 | #ifdef KEYSYM_RESOURCE |
311 | #ifdef KEYSYM_RESOURCE |
310 | delete keyboard; |
312 | delete keyboard; |
|
|
313 | #endif |
|
|
314 | #ifndef NO_RESOURCES |
|
|
315 | XrmDestroyDatabase (option_db); |
311 | #endif |
316 | #endif |
312 | } |
317 | } |
313 | |
318 | |
314 | // child has exited, usually destroys |
319 | // child has exited, usually destroys |
315 | void |
320 | void |
… | |
… | |
617 | void |
622 | void |
618 | rxvt_init () |
623 | rxvt_init () |
619 | { |
624 | { |
620 | ptytty::init (); |
625 | ptytty::init (); |
621 | |
626 | |
622 | if (!ev::ev_default_loop (0)) |
627 | if (!ev_default_loop (0)) |
623 | rxvt_fatal ("cannot initialise libev (bad value for LIBEV_METHODS?)\n"); |
628 | rxvt_fatal ("cannot initialise libev (bad value for LIBEV_METHODS?)\n"); |
624 | |
629 | |
625 | rxvt_environ = environ; |
630 | rxvt_environ = environ; |
626 | |
631 | |
627 | signal (SIGHUP, SIG_IGN); |
632 | signal (SIGHUP, SIG_IGN); |
628 | signal (SIGPIPE, SIG_IGN); |
633 | signal (SIGPIPE, SIG_IGN); |
629 | |
634 | |
630 | sig_handlers.sw_term.start (SIGTERM); ev::ev_unref (); |
635 | sig_handlers.sw_term.start (SIGTERM); ev_unref (); |
631 | sig_handlers.sw_int.start (SIGINT); ev::ev_unref (); |
636 | sig_handlers.sw_int.start (SIGINT); ev_unref (); |
632 | |
637 | |
633 | /* need to trap SIGURG for SVR4 (Unixware) rlogin */ |
638 | /* need to trap SIGURG for SVR4 (Unixware) rlogin */ |
634 | /* signal (SIGURG, SIG_DFL); */ |
639 | /* signal (SIGURG, SIG_DFL); */ |
635 | |
640 | |
636 | old_xerror_handler = XSetErrorHandler ((XErrorHandler) rxvt_xerror_handler); |
641 | old_xerror_handler = XSetErrorHandler ((XErrorHandler) rxvt_xerror_handler); |
… | |
… | |
974 | if (isdigit (*color)) |
979 | if (isdigit (*color)) |
975 | { |
980 | { |
976 | i = atoi (color); |
981 | i = atoi (color); |
977 | |
982 | |
978 | if (i >= 8 && i <= 15) |
983 | if (i >= 8 && i <= 15) |
|
|
984 | { |
979 | { /* bright colors */ |
985 | /* bright colors */ |
980 | i -= 8; |
986 | i -= 8; |
981 | pix_colors_focused[idx] = pix_colors_focused[minBrightCOLOR + i]; |
987 | pix_colors_focused[idx] = pix_colors_focused[minBrightCOLOR + i]; |
982 | goto done; |
988 | goto done; |
983 | } |
989 | } |
984 | |
990 | |
985 | if (i >= 0 && i <= 7) |
991 | if (i >= 0 && i <= 7) |
|
|
992 | { |
986 | { /* normal colors */ |
993 | /* normal colors */ |
987 | pix_colors_focused[idx] = pix_colors_focused[minCOLOR + i]; |
994 | pix_colors_focused[idx] = pix_colors_focused[minCOLOR + i]; |
988 | goto done; |
995 | goto done; |
989 | } |
996 | } |
990 | } |
997 | } |
991 | |
998 | |
… | |
… | |
996 | * so just keep gobbling up the colormap |
1003 | * so just keep gobbling up the colormap |
997 | */ |
1004 | */ |
998 | |
1005 | |
999 | pix_colors_focused[idx] = xcol; |
1006 | pix_colors_focused[idx] = xcol; |
1000 | |
1007 | |
1001 | /* XSetWindowAttributes attr; */ |
|
|
1002 | /* Cursor cursor; */ |
|
|
1003 | done: |
1008 | done: |
1004 | /*TODO: handle Color_BD, scrollbar background, etc. */ |
1009 | /*TODO: handle Color_BD, scrollbar background, etc. */ |
1005 | |
1010 | |
1006 | update_fade_color (idx); |
1011 | update_fade_color (idx); |
1007 | recolour_cursor (); |
1012 | recolour_cursor (); |