… | |
… | |
259 | } |
259 | } |
260 | |
260 | |
261 | // TODO: free pixcolours, colours should become part of rxvt_display |
261 | // TODO: free pixcolours, colours should become part of rxvt_display |
262 | |
262 | |
263 | delete pix_colors_focused; |
263 | delete pix_colors_focused; |
264 | #ifdef OFF_FOCUS_FADING |
264 | #if OFF_FOCUS_FADING |
265 | delete pix_colors_unfocused; |
265 | delete pix_colors_unfocused; |
266 | #endif |
266 | #endif |
267 | |
267 | |
268 | displays.put (display); |
268 | displays.put (display); |
269 | |
269 | |
… | |
… | |
417 | { |
417 | { |
418 | if (GET_R->allowedxerror == -1) |
418 | if (GET_R->allowedxerror == -1) |
419 | GET_R->allowedxerror = event->error_code; |
419 | GET_R->allowedxerror = event->error_code; |
420 | else |
420 | else |
421 | { |
421 | { |
422 | //TODO: GET_R is most likely not the terminal which caused the error |
422 | // GET_R is most likely not the terminal which caused the error, |
423 | //TODO: maybe just output the error and continue? |
423 | // so just output the error and continue |
424 | #if ENABLE_FRILLS |
424 | #if ENABLE_FRILLS |
425 | print_x_error (display, event); |
425 | print_x_error (display, event); |
426 | #else |
426 | #else |
427 | old_xerror_handler (display, event); |
427 | old_xerror_handler (display, event); |
428 | #endif |
428 | #endif |
… | |
… | |
990 | { /* bright colors */ |
990 | { /* bright colors */ |
991 | i -= 8; |
991 | i -= 8; |
992 | # ifndef NO_BRIGHTCOLOR |
992 | # ifndef NO_BRIGHTCOLOR |
993 | pix_colors_focused[idx] = pix_colors_focused[minBrightCOLOR + i]; |
993 | pix_colors_focused[idx] = pix_colors_focused[minBrightCOLOR + i]; |
994 | SET_PIXCOLOR (idx); |
994 | SET_PIXCOLOR (idx); |
995 | goto Done; |
995 | goto done; |
996 | # endif |
996 | # endif |
997 | } |
997 | } |
998 | |
998 | |
999 | if (i >= 0 && i <= 7) |
999 | if (i >= 0 && i <= 7) |
1000 | { /* normal colors */ |
1000 | { /* normal colors */ |
1001 | pix_colors_focused[idx] = pix_colors_focused[minCOLOR + i]; |
1001 | pix_colors_focused[idx] = pix_colors_focused[minCOLOR + i]; |
1002 | SET_PIXCOLOR (idx); |
1002 | SET_PIXCOLOR (idx); |
1003 | goto Done; |
1003 | goto done; |
1004 | } |
1004 | } |
1005 | } |
1005 | } |
1006 | |
1006 | |
1007 | if (!rXParseAllocColor (&xcol, color)) |
1007 | if (!rXParseAllocColor (&xcol, color)) |
1008 | return; |
1008 | return; |
… | |
… | |
1028 | pix_colors_focused[idx] = xcol; |
1028 | pix_colors_focused[idx] = xcol; |
1029 | SET_PIXCOLOR (idx); |
1029 | SET_PIXCOLOR (idx); |
1030 | |
1030 | |
1031 | /* XSetWindowAttributes attr; */ |
1031 | /* XSetWindowAttributes attr; */ |
1032 | /* Cursor cursor; */ |
1032 | /* Cursor cursor; */ |
1033 | Done: |
1033 | done: |
|
|
1034 | |
1034 | #ifdef OFF_FOCUS_FADING |
1035 | #if OFF_FOCUS_FADING |
1035 | if (rs[Rs_fade]) |
1036 | if (rs[Rs_fade]) |
1036 | pix_colors_unfocused[idx] = pix_colors_focused[idx].fade (display, atoi (rs[Rs_fade])); |
1037 | pix_colors_unfocused[idx] = pix_colors_focused[idx].fade (display, atoi (rs[Rs_fade]), pix_colors[Color_fade]); |
1037 | #endif |
1038 | #endif |
1038 | |
1039 | |
1039 | /*TODO: handle Color_BD, scrollbar background, etc. */ |
1040 | /*TODO: handle Color_BD, scrollbar background, etc. */ |
1040 | |
1041 | |
1041 | recolour_cursor (); |
1042 | recolour_cursor (); |