diff options
author | nicm <nicm> | 2021-12-07 07:28:44 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-12-07 07:28:44 +0000 |
commit | d721fb2a9fd70c157abb8540d4c50fca654f9f4d (patch) | |
tree | d4d3a2875baf4536124c376c18e9533f260d5611 /input.c | |
parent | 7532a5cf9574f8c5e102383329477e934992d2ea (diff) | |
download | rtmux-d721fb2a9fd70c157abb8540d4c50fca654f9f4d.tar.gz rtmux-d721fb2a9fd70c157abb8540d4c50fca654f9f4d.tar.bz2 rtmux-d721fb2a9fd70c157abb8540d4c50fca654f9f4d.zip |
Respond to OSC 4 query.
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -2505,7 +2505,8 @@ input_osc_colour_reply(struct input_ctx *ictx, u_int n, int c) end = "\007"; else end = "\033\\"; - input_reply(ictx, "\033]%u;rgb:%02hhx/%02hhx/%02hhx%s", n, r, g, b, end); + input_reply(ictx, "\033]%u;rgb:%02hhx%02hhx/%02hhx%02hhx/%02hhx%02hhx%s", + n, r, r, g, g, b, b, end); } /* Handle the OSC 4 sequence for setting (multiple) palette entries. */ @@ -2529,6 +2530,12 @@ input_osc_4(struct input_ctx *ictx, const char *p) } s = strsep(&next, ";"); + if (strcmp(s, "?") == 0) { + c = colour_palette_get(ictx->palette, idx); + if (c != -1) + input_osc_colour_reply(ictx, 4, c); + continue; + } if ((c = input_osc_parse_colour(s)) == -1) { s = next; continue; |