mirror of
https://github.com/YaLTeR/niri.git
synced 2025-10-06 00:23:14 +02:00
layout: Remove by-ref animation_snapshot() getter
It was used in only one place, and that place was due for an update to use the cached data.
This commit is contained in:
@@ -255,10 +255,6 @@ impl LayoutElement for TestWindow {
|
||||
&EMPTY
|
||||
}
|
||||
|
||||
fn animation_snapshot(&self) -> Option<&LayoutElementRenderSnapshot> {
|
||||
None
|
||||
}
|
||||
|
||||
fn take_animation_snapshot(&mut self) -> Option<LayoutElementRenderSnapshot> {
|
||||
None
|
||||
}
|
||||
|
@@ -270,7 +270,6 @@ pub trait LayoutElement {
|
||||
/// Runs periodic clean-up tasks.
|
||||
fn refresh(&self);
|
||||
|
||||
fn animation_snapshot(&self) -> Option<&LayoutElementRenderSnapshot>;
|
||||
fn take_animation_snapshot(&mut self) -> Option<LayoutElementRenderSnapshot>;
|
||||
|
||||
fn set_interactive_resize(&mut self, data: Option<InteractiveResizeData>);
|
||||
|
@@ -4041,15 +4041,13 @@ impl<W: LayoutElement> Column<W> {
|
||||
.find(|(_, tile)| tile.window().id() == window)
|
||||
.unwrap();
|
||||
|
||||
let height = f64::from(tile.window().size().h);
|
||||
let offset = tile
|
||||
.window()
|
||||
.animation_snapshot()
|
||||
.map_or(0., |from| from.size.h - height);
|
||||
let prev_height = self.data[tile_idx].size.h;
|
||||
|
||||
tile.update_window();
|
||||
self.data[tile_idx].update(tile);
|
||||
|
||||
let offset = prev_height - self.data[tile_idx].size.h;
|
||||
|
||||
let is_tabbed = self.display_mode == ColumnDisplay::Tabbed;
|
||||
|
||||
// Move windows below in tandem with resizing.
|
||||
|
@@ -244,10 +244,6 @@ impl LayoutElement for TestWindow {
|
||||
&EMPTY
|
||||
}
|
||||
|
||||
fn animation_snapshot(&self) -> Option<&LayoutElementRenderSnapshot> {
|
||||
None
|
||||
}
|
||||
|
||||
fn take_animation_snapshot(&mut self) -> Option<LayoutElementRenderSnapshot> {
|
||||
None
|
||||
}
|
||||
|
@@ -1174,10 +1174,6 @@ impl LayoutElement for Mapped {
|
||||
&self.rules
|
||||
}
|
||||
|
||||
fn animation_snapshot(&self) -> Option<&LayoutElementRenderSnapshot> {
|
||||
self.animation_snapshot.as_ref()
|
||||
}
|
||||
|
||||
fn take_animation_snapshot(&mut self) -> Option<LayoutElementRenderSnapshot> {
|
||||
self.animation_snapshot.take()
|
||||
}
|
||||
|
Reference in New Issue
Block a user