diff options
Diffstat (limited to 'src/layout')
| -rw-r--r-- | src/layout/mod.rs | 2 | ||||
| -rw-r--r-- | src/layout/tile.rs | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs index bc5c8dcf..bbca41c9 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -95,6 +95,7 @@ pub trait LayoutElement { renderer: &mut R, location: Point<i32, Logical>, scale: Scale<f64>, + alpha: f32, ) -> Vec<LayoutElementRenderElement<R>>; fn request_size(&self, size: Size<i32, Logical>); @@ -1856,6 +1857,7 @@ mod tests { _renderer: &mut R, _location: Point<i32, Logical>, _scale: Scale<f64>, + _alpha: f32, ) -> Vec<LayoutElementRenderElement<R>> { vec![] } diff --git a/src/layout/tile.rs b/src/layout/tile.rs index 0609583e..faa17840 100644 --- a/src/layout/tile.rs +++ b/src/layout/tile.rs @@ -325,9 +325,15 @@ impl<W: LayoutElement> Tile<W> { view_size: Size<i32, Logical>, focus_ring: bool, ) -> impl Iterator<Item = TileRenderElement<R>> { + let alpha = if self.is_fullscreen { + 1. + } else { + self.window.rules().opacity.unwrap_or(1.).clamp(0., 1.) + }; + let rv = self .window - .render(renderer, location + self.window_loc(), scale) + .render(renderer, location + self.window_loc(), scale, alpha) .into_iter() .map(Into::into); |
