ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.597 by root, Sun Jun 26 15:45:48 2022 UTC vs.
Revision 1.598 by sf-exg, Sun Sep 18 20:32:17 2022 UTC

3412void 3412void
3413rxvt_term::process_color_seq (int report, int color, const char *str, char resp) 3413rxvt_term::process_color_seq (int report, int color, const char *str, char resp)
3414{ 3414{
3415 if (str[0] == '?' && !str[1]) 3415 if (str[0] == '?' && !str[1])
3416 { 3416 {
3417 if (!IN_RANGE_INC (color, minCOLOR, maxTermCOLOR))
3418 return;
3419
3420 rgba c; 3417 rgba c;
3421 pix_colors_focused[color].get (c); 3418 pix_colors_focused[color].get (c);
3422 color -= minCOLOR; 3419 char rgba_str[32];
3423 3420
3424#if XFT 3421#if XFT
3425 if (c.a != rgba::MAX_CC) 3422 if (c.a != rgba::MAX_CC)
3426 tt_printf ("\033]%d;%d;rgba:%04x/%04x/%04x/%04x%c", report, color, c.r, c.g, c.b, c.a, resp); 3423 snprintf (rgba_str, sizeof (rgba_str), "rgba:%04x/%04x/%04x/%04x", c.r, c.g, c.b, c.a);
3427 else 3424 else
3428#endif 3425#endif
3429 tt_printf ("\033]%d;%d;rgb:%04x/%04x/%04x%c", report, color, c.r, c.g, c.b, resp); 3426 snprintf (rgba_str, sizeof (rgba_str), "rgb:%04x/%04x/%04x", c.r, c.g, c.b);
3427
3428 if (IN_RANGE_INC (color, minCOLOR, maxTermCOLOR))
3429 tt_printf ("\033]%d;%d;%s%c", report, color - minCOLOR, rgba_str, resp);
3430 else
3431 tt_printf ("\033]%d;%s%c", report, rgba_str, resp);
3430 } 3432 }
3431 else 3433 else
3432 set_window_color (color, str); 3434 set_window_color (color, str);
3433} 3435}
3434 3436

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines