diff options
Diffstat (limited to 'src/window')
| -rw-r--r-- | src/window/mapped.rs | 3 | ||||
| -rw-r--r-- | src/window/mod.rs | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/window/mapped.rs b/src/window/mapped.rs index a48ca636..52b9ac92 100644 --- a/src/window/mapped.rs +++ b/src/window/mapped.rs @@ -108,13 +108,14 @@ impl LayoutElement for Mapped { renderer: &mut R, location: Point<i32, Logical>, scale: Scale<f64>, + alpha: f32, ) -> Vec<LayoutElementRenderElement<R>> { let buf_pos = location - self.window.geometry().loc; self.window.render_elements( renderer, buf_pos.to_physical_precise_round(scale), scale, - 1., + alpha, ) } diff --git a/src/window/mod.rs b/src/window/mod.rs index 63cdbe3f..ddf712b0 100644 --- a/src/window/mod.rs +++ b/src/window/mod.rs @@ -52,6 +52,9 @@ pub struct ResolvedWindowRules { /// /// `None` means using the SSD heuristic. pub draw_border_with_background: Option<bool>, + + /// Extra opacity to draw this window with. + pub opacity: Option<f32>, } impl<'a> WindowRef<'a> { @@ -82,6 +85,7 @@ impl ResolvedWindowRules { max_width: None, max_height: None, draw_border_with_background: None, + opacity: None, } } @@ -153,6 +157,9 @@ impl ResolvedWindowRules { if let Some(x) = rule.draw_border_with_background { resolved.draw_border_with_background = Some(x); } + if let Some(x) = rule.opacity { + resolved.opacity = Some(x); + } } resolved.open_on_output = open_on_output.map(|x| x.to_owned()); |
