diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-04-08 19:25:45 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-04-08 19:25:45 +0400 |
| commit | 4856522a7a96f29179b5e723537d797f779c148d (patch) | |
| tree | 892e10c3ce859d1aab5c67711b097f38a391fd7f /src/layout/tile.rs | |
| parent | c1432bfa96e40c12f2d10174f8cd23ec9c2a68b0 (diff) | |
| download | niri-4856522a7a96f29179b5e723537d797f779c148d.tar.gz niri-4856522a7a96f29179b5e723537d797f779c148d.tar.bz2 niri-4856522a7a96f29179b5e723537d797f779c148d.zip | |
Implement window open shift in terms of window-movement
This removes the quite unobvious visual size, and fixes jerking when
opening multiple windows in quick succession.
Diffstat (limited to 'src/layout/tile.rs')
| -rw-r--r-- | src/layout/tile.rs | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/layout/tile.rs b/src/layout/tile.rs index 3d2da48c..ed71d8a0 100644 --- a/src/layout/tile.rs +++ b/src/layout/tile.rs @@ -203,23 +203,6 @@ impl<W: LayoutElement> Tile<W> { self.window.size() } - /// Returns an animated size of the tile for rendering and input. - /// - /// During the window opening animation, windows to the right should gradually slide further to - /// the right. This is what this visual size is used for. Other things like window resizes or - /// transactions or new view position calculation always use the real size, instead of this - /// visual size. - pub fn visual_tile_size(&self) -> Size<i32, Logical> { - let size = self.tile_size(); - let v = self - .open_animation - .as_ref() - .map(|anim| anim.value()) - .unwrap_or(1.) - .max(0.); - Size::from(((f64::from(size.w) * v).round() as i32, size.h)) - } - pub fn buf_loc(&self) -> Point<i32, Logical> { let mut loc = Point::from((0, 0)); loc += self.window_loc(); |
