mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-03 07:15:29 -04:00
render: disable transparency in margins when in fullscreen
This amends 899b768b74, where we started
disabling transparency in fullscreen
Closes #1503
This commit is contained in:
parent
61eb56dfda
commit
56d5d4cc21
2 changed files with 14 additions and 2 deletions
|
|
@ -109,12 +109,15 @@
|
||||||
* Crash when compositor calls `fractional_scale::preferred_scale()`
|
* Crash when compositor calls `fractional_scale::preferred_scale()`
|
||||||
when there are no monitors (for example, after a monitor has been
|
when there are no monitors (for example, after a monitor has been
|
||||||
turned off and then back on again) ([#1498][1498]).
|
turned off and then back on again) ([#1498][1498]).
|
||||||
|
* Transparency in margins (padding) not being disabled in fullscreen
|
||||||
|
mode ([#1503][1503]).
|
||||||
|
|
||||||
[1436]: https://codeberg.org/dnkl/foot/issues/1436
|
[1436]: https://codeberg.org/dnkl/foot/issues/1436
|
||||||
[1464]: https://codeberg.org/dnkl/foot/issues/1464
|
[1464]: https://codeberg.org/dnkl/foot/issues/1464
|
||||||
[1465]: https://codeberg.org/dnkl/foot/issues/1465
|
[1465]: https://codeberg.org/dnkl/foot/issues/1465
|
||||||
[1493]: https://codeberg.org/dnkl/foot/pulls/1493
|
[1493]: https://codeberg.org/dnkl/foot/pulls/1493
|
||||||
[1498]: https://codeberg.org/dnkl/foot/issues/1498
|
[1498]: https://codeberg.org/dnkl/foot/issues/1498
|
||||||
|
[1503]: https://codeberg.org/dnkl/foot/issues/1503
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
||||||
13
render.c
13
render.c
|
|
@ -545,6 +545,8 @@ render_cell(struct terminal *term, pixman_image_t *pix,
|
||||||
*
|
*
|
||||||
* By disabling the alpha channel, the window will at
|
* By disabling the alpha channel, the window will at
|
||||||
* least be rendered in the intended background color.
|
* least be rendered in the intended background color.
|
||||||
|
*
|
||||||
|
* NOTE: if changing this, also update render_margin()
|
||||||
*/
|
*/
|
||||||
xassert(alpha == 0xffff);
|
xassert(alpha == 0xffff);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -882,8 +884,15 @@ render_margin(struct terminal *term, struct buffer *buf,
|
||||||
const int bmargin = term->height - term->margins.bottom;
|
const int bmargin = term->height - term->margins.bottom;
|
||||||
const int line_count = end_line - start_line;
|
const int line_count = end_line - start_line;
|
||||||
|
|
||||||
uint32_t _bg = !term->reverse ? term->colors.bg : term->colors.fg;
|
const uint32_t _bg = !term->reverse ? term->colors.bg : term->colors.fg;
|
||||||
pixman_color_t bg = color_hex_to_pixman_with_alpha(_bg, term->colors.alpha);
|
uint16_t alpha = term->colors.alpha;
|
||||||
|
|
||||||
|
if (term->window->is_fullscreen) {
|
||||||
|
/* Disable alpha in fullscreen - see render_cell() for details */
|
||||||
|
alpha = 0xffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
pixman_color_t bg = color_hex_to_pixman_with_alpha(_bg, alpha);
|
||||||
|
|
||||||
pixman_image_fill_rectangles(
|
pixman_image_fill_rectangles(
|
||||||
PIXMAN_OP_SRC, buf->pix[0], &bg, 4,
|
PIXMAN_OP_SRC, buf->pix[0], &bg, 4,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue