… | |
… | |
368 | { |
368 | { |
369 | for (rxvt_term **t = rxvt_term::termlist.begin (); t < rxvt_term::termlist.end (); t++) |
369 | for (rxvt_term **t = rxvt_term::termlist.begin (); t < rxvt_term::termlist.end (); t++) |
370 | (*t)->emergency_cleanup (); |
370 | (*t)->emergency_cleanup (); |
371 | } |
371 | } |
372 | |
372 | |
373 | #if ENABLE_FRILLS |
373 | #if !ENABLE_MINIMAL |
374 | static void |
374 | static void |
375 | print_x_error (Display *dpy, XErrorEvent *event) |
375 | print_x_error (Display *dpy, XErrorEvent *event) |
376 | { |
376 | { |
377 | char buffer[BUFSIZ]; |
377 | char buffer[BUFSIZ]; |
378 | char mesg[BUFSIZ]; |
378 | char mesg[BUFSIZ]; |
… | |
… | |
426 | GET_R->allowedxerror = event->error_code; |
426 | GET_R->allowedxerror = event->error_code; |
427 | else |
427 | else |
428 | { |
428 | { |
429 | // GET_R is most likely not the terminal which caused the error, |
429 | // GET_R is most likely not the terminal which caused the error, |
430 | // so just output the error and continue |
430 | // so just output the error and continue |
431 | #if ENABLE_FRILLS |
431 | #if ENABLE_MINIMAL |
|
|
432 | old_xerror_handler (display, event); |
|
|
433 | #else |
432 | print_x_error (display, event); |
434 | print_x_error (display, event); |
433 | #else |
|
|
434 | old_xerror_handler (display, event); |
|
|
435 | #endif |
435 | #endif |
436 | } |
436 | } |
437 | |
437 | |
438 | return 0; |
438 | return 0; |
439 | } |
439 | } |
… | |
… | |
912 | SET_PIXCOLOR (idx); |
912 | SET_PIXCOLOR (idx); |
913 | goto done; |
913 | goto done; |
914 | } |
914 | } |
915 | } |
915 | } |
916 | |
916 | |
917 | if (!rXParseAllocColor (&xcol, color)) |
917 | if (!set_color (xcol, color)) |
918 | return; |
918 | return; |
919 | |
919 | |
920 | /* XStoreColor (xdisp, display->cmap, XColor*); */ |
920 | /* XStoreColor (xdisp, display->cmap, XColor*); */ |
921 | |
921 | |
922 | /* |
922 | /* |
… | |
… | |
942 | /* Cursor cursor; */ |
942 | /* Cursor cursor; */ |
943 | done: |
943 | done: |
944 | |
944 | |
945 | #if OFF_FOCUS_FADING |
945 | #if OFF_FOCUS_FADING |
946 | if (rs[Rs_fade]) |
946 | if (rs[Rs_fade]) |
947 | pix_colors_unfocused[idx] = pix_colors_focused[idx].fade (this, atoi (rs[Rs_fade]), pix_colors[Color_fade]); |
947 | { |
|
|
948 | rxvt_rgba c; |
|
|
949 | pix_colors [Color_fade].get (this, c); |
|
|
950 | pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c); |
|
|
951 | } |
948 | #endif |
952 | #endif |
949 | |
953 | |
950 | /*TODO: handle Color_BD, scrollbar background, etc. */ |
954 | /*TODO: handle Color_BD, scrollbar background, etc. */ |
951 | |
955 | |
952 | recolour_cursor (); |
956 | recolour_cursor (); |
… | |
… | |
1006 | sprintf (env_colorfgbg, "COLORFGBG=%s;%s%s", fstr, xpmb, bstr); |
1010 | sprintf (env_colorfgbg, "COLORFGBG=%s;%s%s", fstr, xpmb, bstr); |
1007 | } |
1011 | } |
1008 | |
1012 | |
1009 | /*----------------------------------------------------------------------*/ |
1013 | /*----------------------------------------------------------------------*/ |
1010 | |
1014 | |
1011 | int |
1015 | bool |
1012 | rxvt_term::rXParseAllocColor (rxvt_color *screen_in_out, const char *colour) |
1016 | rxvt_term::set_color (rxvt_color &color, const char *name) |
1013 | { |
1017 | { |
1014 | if (!screen_in_out->set (this, colour)) |
1018 | if (color.set (this, name)) |
1015 | { |
|
|
1016 | rxvt_warn ("can't get colour '%s', continuing without.\n", colour); |
|
|
1017 | return false; |
|
|
1018 | } |
|
|
1019 | |
|
|
1020 | return true; |
1019 | return true; |
|
|
1020 | |
|
|
1021 | rxvt_warn ("can't get colour '%s', continuing without.\n", name); |
|
|
1022 | return false; |
1021 | } |
1023 | } |
1022 | |
1024 | |
1023 | /* -------------------------------------------------------------------- * |
1025 | /* -------------------------------------------------------------------- * |
1024 | * - WINDOW RESIZING - * |
1026 | * - WINDOW RESIZING - * |
1025 | * -------------------------------------------------------------------- */ |
1027 | * -------------------------------------------------------------------- */ |