Implement opacity window rule

This commit is contained in:
Ivan Molodetskikh
2024-03-24 08:30:26 +04:00
parent a16a0f0e52
commit 8b4a9d68e0
8 changed files with 34 additions and 5 deletions
+7 -1
View File
@@ -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);