aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-06-20 15:02:26 +0100
committerThomas Adam <thomas@xteddy.org>2019-06-20 15:02:26 +0100
commitf8ad72b2eeafc1146c116f73194a3950aa0c2143 (patch)
tree98b47921006cbb3e96d98fc8214824ec130e364e /input.c
parenta0e2c1b4cae9269d04ee2e80e1d1cb8adc78cd8a (diff)
parent5f92f92908b81b4ec66682adb84b9ffc8d83c2f7 (diff)
downloadrtmux-f8ad72b2eeafc1146c116f73194a3950aa0c2143.tar.gz
rtmux-f8ad72b2eeafc1146c116f73194a3950aa0c2143.tar.bz2
rtmux-f8ad72b2eeafc1146c116f73194a3950aa0c2143.zip
Merge branch 'obsd-master'
Diffstat (limited to 'input.c')
-rw-r--r--input.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/input.c b/input.c
index e54b5ac0..3e85e14f 100644
--- a/input.c
+++ b/input.c
@@ -2347,12 +2347,14 @@ input_osc_10(struct input_ctx *ictx, const char *p)
{
struct window_pane *wp = ictx->wp;
u_int r, g, b;
+ char tmp[16];
if (sscanf(p, "rgb:%2x/%2x/%2x", &r, &g, &b) != 3)
goto bad;
-
- wp->style.gc.fg = colour_join_rgb(r, g, b);
- wp->flags |= PANE_REDRAW;
+ xsnprintf(tmp, sizeof tmp, "fg=#%02x%02x%02x", r, g, b);
+ options_set_style(wp->options, "window-style", 1, tmp);
+ options_set_style(wp->options, "window-active-style", 1, tmp);
+ wp->flags |= (PANE_REDRAW|PANE_STYLECHANGED);
return;
@@ -2366,12 +2368,14 @@ input_osc_11(struct input_ctx *ictx, const char *p)
{
struct window_pane *wp = ictx->wp;
u_int r, g, b;
+ char tmp[16];
if (sscanf(p, "rgb:%2x/%2x/%2x", &r, &g, &b) != 3)
goto bad;
-
- wp->style.gc.bg = colour_join_rgb(r, g, b);
- wp->flags |= PANE_REDRAW;
+ xsnprintf(tmp, sizeof tmp, "bg=#%02x%02x%02x", r, g, b);
+ options_set_style(wp->options, "window-style", 1, tmp);
+ options_set_style(wp->options, "window-active-style", 1, tmp);
+ wp->flags |= (PANE_REDRAW|PANE_STYLECHANGED);
return;