aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-10-05 09:49:49 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-10-15 09:04:16 +0300
commit1cede8922f29af8a7e60c46ee6e516112c9ee1aa (patch)
tree7072374bfd938fcf804d5f4ea8954ff8a60a834f
parent80c22b805eedffcf8b4bcabb2cfab739af446797 (diff)
downloadniri-1cede8922f29af8a7e60c46ee6e516112c9ee1aa.tar.gz
niri-1cede8922f29af8a7e60c46ee6e516112c9ee1aa.tar.bz2
niri-1cede8922f29af8a7e60c46ee6e516112c9ee1aa.zip
layout/tile: Fade out focus ring for fullscreen
-rw-r--r--src/layout/tile.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/layout/tile.rs b/src/layout/tile.rs
index b574b7a2..1aab3e0d 100644
--- a/src/layout/tile.rs
+++ b/src/layout/tile.rs
@@ -466,7 +466,7 @@ impl<W: LayoutElement> Tile<W> {
view_rect,
radius,
self.scale,
- 1.,
+ 1. - fullscreen_progress as f32,
);
self.fullscreen_backdrop.resize(animated_tile_size);
@@ -1187,7 +1187,10 @@ impl<W: LayoutElement> Tile<W> {
});
let rv = rv.chain(elem.into_iter().flatten());
- let elem = focus_ring.then(|| self.focus_ring.render(renderer, location).map(Into::into));
+ // Hide the focus ring when fullscreened. It's not normally visible anyway due to being
+ // outside the monitor, but it is visible in the overview (which is a bit weird).
+ let elem = (focus_ring && fullscreen_progress < 1.)
+ .then(|| self.focus_ring.render(renderer, location).map(Into::into));
let rv = rv.chain(elem.into_iter().flatten());
rv.chain(self.shadow.render(renderer, location).map(Into::into))