aboutsummaryrefslogtreecommitdiff
path: root/osc.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2025-05-02 06:53:43 +0000
committerDaniel Eklöf <daniel@ekloef.se>2025-05-02 16:54:03 +0000
commit7354b94f737c9f589803b23714e7eddfb2f0fd69 (patch)
tree342538ddb0cd99af94f0cdc8c1325bde62b80049 /osc.c
parentwayland: attempt to log protocol errors on failure to flush (diff)
osc: restore configured alpha if OSC-11 has no alpha value
When parsing an OSC-11 without an alpha value (i.e. standard OSC-11, not rxvt's extended variant), restore the alpha value from the configuration, rather than keeping whatever the current alpha is.
Diffstat (limited to 'osc.c')
-rw-r--r--osc.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/osc.c b/osc.c
index 7e3e6376..78f335e1 100644
--- a/osc.c
+++ b/osc.c
@@ -1455,15 +1455,20 @@ osc_dispatch(struct terminal *term)
case 11:
term->colors.bg = color;
- if (have_alpha) {
- const bool changed = term->colors.alpha != alpha;
- term->colors.alpha = alpha;
+ if (!have_alpha) {
+ alpha = term->colors.active_theme == COLOR_THEME1
+ ? term->conf->colors.alpha
+ : term->conf->colors2.alpha;
+ }
- if (changed) {
- wayl_win_alpha_changed(term->window);
- term_font_subpixel_changed(term);
- }
+ const bool changed = term->colors.alpha != alpha;
+ term->colors.alpha = alpha;
+
+ if (changed) {
+ wayl_win_alpha_changed(term->window);
+ term_font_subpixel_changed(term);
}
+
term_damage_color(term, COLOR_DEFAULT, 0);
term_damage_margins(term);
break;