mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-15 22:05:24 -05:00
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.
This commit is contained in:
parent
5080e271c2
commit
7354b94f73
2 changed files with 16 additions and 8 deletions
|
|
@ -95,6 +95,9 @@
|
|||
### Changed
|
||||
|
||||
* `cursor.color` moved to `colors.cursor`.
|
||||
* OSC-11 without an alpha value will now restore the configured
|
||||
(i.e. from `foot.ini`) alpha, rather than keeping whatever the
|
||||
current alpha value is, unchanged.
|
||||
|
||||
|
||||
### Deprecated
|
||||
|
|
|
|||
21
osc.c
21
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 (changed) {
|
||||
wayl_win_alpha_changed(term->window);
|
||||
term_font_subpixel_changed(term);
|
||||
}
|
||||
if (!have_alpha) {
|
||||
alpha = term->colors.active_theme == COLOR_THEME1
|
||||
? term->conf->colors.alpha
|
||||
: term->conf->colors2.alpha;
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue