diff options
Diffstat (limited to 'alacritty/src/display')
-rw-r--r-- | alacritty/src/display/content.rs | 6 | ||||
-rw-r--r-- | alacritty/src/display/mod.rs | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/alacritty/src/display/content.rs b/alacritty/src/display/content.rs index 05bd0438..2deb3d3e 100644 --- a/alacritty/src/display/content.rs +++ b/alacritty/src/display/content.rs @@ -203,7 +203,7 @@ impl RenderableCell { mem::swap(&mut fg, &mut bg); 1.0 } else { - Self::compute_bg_alpha(cell.bg) + Self::compute_bg_alpha(&content.config.ui_config, cell.bg) }; let is_selected = content.terminal_content.selection.map_or(false, |selection| { @@ -350,9 +350,11 @@ impl RenderableCell { /// using the named input color, rather than checking the RGB of the background after its color /// is computed. #[inline] - fn compute_bg_alpha(bg: Color) -> f32 { + fn compute_bg_alpha(config: &UiConfig, bg: Color) -> f32 { if bg == Color::Named(NamedColor::Background) { 0. + } else if config.colors.transparent_background_colors { + config.window_opacity() } else { 1. } diff --git a/alacritty/src/display/mod.rs b/alacritty/src/display/mod.rs index cce3c8bd..d4c5c274 100644 --- a/alacritty/src/display/mod.rs +++ b/alacritty/src/display/mod.rs @@ -299,7 +299,7 @@ impl Display { // Disable shadows for transparent windows on macOS. #[cfg(target_os = "macos")] - window.set_has_shadow(config.ui_config.background_opacity() >= 1.0); + window.set_has_shadow(config.ui_config.window_opacity() >= 1.0); // On Wayland we can safely ignore this call, since the window isn't visible until you // actually draw something into it and commit those changes. |