mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-24 01:40:12 -05:00
osc: regression: fix OSC-111 handling of alpha changes
When the background alpha changes from fully opaque, to transparent, or vice versa, we need to do more than just repaint the affected cells. For example, we need to create new surfaces with the correct pixel format. OSC-11 (set background color) already does this, but the same alpha checking logic was missing in OSC-111 (reset background color). Fixes #1801
This commit is contained in:
parent
eb185bfa47
commit
2896c18981
2 changed files with 17 additions and 1 deletions
|
|
@ -72,6 +72,13 @@
|
|||
### Deprecated
|
||||
### Removed
|
||||
### Fixed
|
||||
|
||||
* Regression: OSC-111 not handling alpha changes correctly, causing
|
||||
visual glitches ([#1801][1801]).
|
||||
|
||||
[1801]: https://codeberg.org/dnkl/foot/issues/1801
|
||||
|
||||
|
||||
### Security
|
||||
### Contributors
|
||||
|
||||
|
|
|
|||
11
osc.c
11
osc.c
|
|
@ -1381,13 +1381,22 @@ osc_dispatch(struct terminal *term)
|
|||
term_damage_color(term, COLOR_DEFAULT, 0);
|
||||
break;
|
||||
|
||||
case 111: /* Reset default text background color */
|
||||
case 111: { /* Reset default text background color */
|
||||
LOG_DBG("resetting background color");
|
||||
bool alpha_changed = term->colors.alpha != term->conf->colors.alpha;
|
||||
|
||||
term->colors.bg = term->conf->colors.bg;
|
||||
term->colors.alpha = term->conf->colors.alpha;
|
||||
|
||||
if (alpha_changed) {
|
||||
wayl_win_alpha_changed(term->window);
|
||||
term_font_subpixel_changed(term);
|
||||
}
|
||||
|
||||
term_damage_color(term, COLOR_DEFAULT, 0);
|
||||
term_damage_margins(term);
|
||||
break;
|
||||
}
|
||||
|
||||
case 112:
|
||||
LOG_DBG("resetting cursor color");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue