diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2023-10-07 05:58:55 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2023-10-07 05:58:55 +0000 |
| commit | 56d5d4cc213d422b2f6dba26d94fb8770203abc5 (patch) | |
| tree | f08450b14dbc1a55fb99d1ddd21c21085a00784b /render.c | |
| parent | shm: if defined, set MFD_NOEXEC_SEAL flag for memfd_create (diff) | |
render: disable transparency in margins when in fullscreen
This amends 899b768b744c74e88e54e6d8eb32f53accea79d8, where we started
disabling transparency in fullscreen
Closes #1503
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -545,6 +545,8 @@ render_cell(struct terminal *term, pixman_image_t *pix, * * By disabling the alpha channel, the window will at * least be rendered in the intended background color. + * + * NOTE: if changing this, also update render_margin() */ xassert(alpha == 0xffff); } else { @@ -882,8 +884,15 @@ render_margin(struct terminal *term, struct buffer *buf, const int bmargin = term->height - term->margins.bottom; const int line_count = end_line - start_line; - 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); + const uint32_t _bg = !term->reverse ? term->colors.bg : term->colors.fg; + 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_OP_SRC, buf->pix[0], &bg, 4, |
