Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions frontends/rioterm/src/renderer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,8 @@ impl Renderer {

let mut dynamic_background =
(named_colors.background.0, named_colors.background.1, false);
if config.window.opacity < 1. {
dynamic_background.1.a = config.window.opacity as f64;
dynamic_background.2 = true;
} else if config.window.background_image.is_some() {
dynamic_background.1 = wgpu::Color::TRANSPARENT;
dynamic_background.2 = true;
}
dynamic_background.1 = wgpu::Color::TRANSPARENT;
dynamic_background.2 = true;

let mut color_automation: HashMap<String, HashMap<String, [f32; 4]>> =
HashMap::new();
Expand Down Expand Up @@ -110,6 +105,7 @@ impl Renderer {

let mut foreground_color = self.compute_color(&square.fg, flags);
let mut background_color = self.compute_bg_color(square);
background_color[3] = 0.0;

let content = if square.c == '\t' || flags.contains(Flags::HIDDEN) {
' '
Expand Down
6 changes: 1 addition & 5 deletions frontends/rioterm/src/screen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,7 @@ impl Screen<'_> {
sugarloaf_errors,
)?;

if cfg!(target_os = "macos") {
sugarloaf.set_background_color(None);
} else {
sugarloaf.set_background_color(Some(renderer.dynamic_background.1));
}
sugarloaf.set_background_color(None);

if let Some(image) = &config.window.background_image {
sugarloaf.set_background_image(image);
Expand Down
14 changes: 13 additions & 1 deletion rio-window/src/platform_impl/windows/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,19 @@ impl Window {
});
}

pub fn set_blur(&self, _blur: bool) {}
pub fn set_blur(&self, blur: bool) {
if true { // use blur
let window = self.window;
unsafe {
DwmSetWindowAttribute(
window,
DWMWA_SYSTEMBACKDROP_TYPE as _,
&BackdropType::TransientWindow as *const _ as _,
4,
);
}
}
}

#[inline]
pub fn set_visible(&self, visible: bool) {
Expand Down
Loading