diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-04-16 17:44:06 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-04-16 17:44:06 +0400 |
| commit | 1b496ee21fab09fee819a5baf685dfd594690d23 (patch) | |
| tree | 5d8f252eda9482735362168af13ad494b1e06bde | |
| parent | bde46dab5210301b6151c639ae5fa11fd7c324cc (diff) | |
| download | niri-1b496ee21fab09fee819a5baf685dfd594690d23.tar.gz niri-1b496ee21fab09fee819a5baf685dfd594690d23.tar.bz2 niri-1b496ee21fab09fee819a5baf685dfd594690d23.zip | |
Clamp animated window size
| -rw-r--r-- | src/layout/tile.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/layout/tile.rs b/src/layout/tile.rs index 0fc64470..87c168b0 100644 --- a/src/layout/tile.rs +++ b/src/layout/tile.rs @@ -351,7 +351,9 @@ impl<W: LayoutElement> Tile<W> { let size_from = resize.size_from; size.w = (size_from.w as f64 + (size.w - size_from.w) as f64 * val).round() as i32; + size.w = max(1, size.w); size.h = (size_from.h as f64 + (size.h - size_from.h) as f64 * val).round() as i32; + size.h = max(1, size.h); } size |
