From c47b86b78a2616debeb426f0d2c4467404bd30ce Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 18 Oct 2020 16:24:48 -0700 Subject: [PATCH] wezterm: fix an issue with opacity when making the window wider The inferred background color for the cells in this case didn't account for the tint. refs: #141 --- wezterm/src/gui/termwindow.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/wezterm/src/gui/termwindow.rs b/wezterm/src/gui/termwindow.rs index 728cbebf1..1f67e5082 100644 --- a/wezterm/src/gui/termwindow.rs +++ b/wezterm/src/gui/termwindow.rs @@ -78,7 +78,6 @@ struct RenderScreenLineOpenGLParams<'a> { cursor_border_color: Color, foreground: Color, - background: Color, } #[derive(Debug, Clone, Copy)] @@ -2647,7 +2646,6 @@ impl TermWindow { config: &config, cursor_border_color, foreground, - background, pos, }, &mut quads, @@ -2739,7 +2737,6 @@ impl TermWindow { config: &config, cursor_border_color, foreground, - background, pos, }, &mut quads, @@ -3131,11 +3128,10 @@ impl TermWindow { params.cursor, ¶ms.selection, params.foreground, - if self.window_background.is_some() { - Color::rgba(0, 0, 0, 0) - } else { - params.background - }, + rgbcolor_alpha_to_window_color( + params.palette.resolve_bg(ColorAttribute::Default), + (params.config.window_background_tint * 255.0) as u8, + ), params.palette, params.pos.is_active, );