aboutsummaryrefslogtreecommitdiff
path: root/niri-visual-tests/src/cases
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-03-19 13:42:04 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-03-19 18:29:13 +0400
commitd421e1fbf8f5d10e331de0572def08a8c1bb402e (patch)
treeb161f360fc88fd4ab3fbb96e337f491be0610925 /niri-visual-tests/src/cases
parent23ac3d73232f307186212293713d6801d37cff2a (diff)
downloadniri-d421e1fbf8f5d10e331de0572def08a8c1bb402e.tar.gz
niri-d421e1fbf8f5d10e331de0572def08a8c1bb402e.tar.bz2
niri-d421e1fbf8f5d10e331de0572def08a8c1bb402e.zip
Move PartialEq from LayoutElement to an associated type
Diffstat (limited to 'niri-visual-tests/src/cases')
-rw-r--r--niri-visual-tests/src/cases/layout.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/niri-visual-tests/src/cases/layout.rs b/niri-visual-tests/src/cases/layout.rs
index be611cc5..e6807228 100644
--- a/niri-visual-tests/src/cases/layout.rs
+++ b/niri-visual-tests/src/cases/layout.rs
@@ -2,7 +2,7 @@ use std::collections::HashMap;
use std::time::Duration;
use niri::layout::workspace::ColumnWidth;
-use niri::layout::Options;
+use niri::layout::{LayoutElement as _, Options};
use niri::utils::get_monotonic_time;
use niri_config::Color;
use smithay::backend::renderer::element::RenderElement;
@@ -73,12 +73,12 @@ impl Layout {
rv.add_window(TestWindow::freeform(0), Some(ColumnWidth::Proportion(0.3)));
rv.add_window(TestWindow::freeform(1), Some(ColumnWidth::Proportion(0.3)));
- rv.layout.activate_window(&rv.windows[0]);
+ rv.layout.activate_window(&0);
rv.add_step(500, |l| {
let win = TestWindow::freeform(2);
l.add_window(win.clone(), Some(ColumnWidth::Proportion(0.3)));
- l.layout.start_open_animation_for_window(&win);
+ l.layout.start_open_animation_for_window(win.id());
});
rv
@@ -91,7 +91,7 @@ impl Layout {
rv.add_step(delay, move |l| {
let win = TestWindow::freeform(delay as usize);
l.add_window(win.clone(), Some(ColumnWidth::Proportion(0.3)));
- l.layout.start_open_animation_for_window(&win);
+ l.layout.start_open_animation_for_window(win.id());
});
}
@@ -105,7 +105,7 @@ impl Layout {
rv.add_step(delay, move |l| {
let win = TestWindow::freeform(delay as usize);
l.add_window(win.clone(), Some(ColumnWidth::Proportion(0.5)));
- l.layout.start_open_animation_for_window(&win);
+ l.layout.start_open_animation_for_window(win.id());
});
}
@@ -122,7 +122,7 @@ impl Layout {
let win = TestWindow::freeform(2);
let right_of = l.windows[0].clone();
l.add_window_right_of(&right_of, win.clone(), Some(ColumnWidth::Proportion(0.3)));
- l.layout.start_open_animation_for_window(&win);
+ l.layout.start_open_animation_for_window(win.id());
});
rv
@@ -138,7 +138,7 @@ impl Layout {
let win = TestWindow::freeform(2);
let right_of = l.windows[0].clone();
l.add_window_right_of(&right_of, win.clone(), Some(ColumnWidth::Proportion(0.5)));
- l.layout.start_open_animation_for_window(&win);
+ l.layout.start_open_animation_for_window(win.id());
});
rv
@@ -147,7 +147,7 @@ impl Layout {
fn add_window(&mut self, window: TestWindow, width: Option<ColumnWidth>) {
self.layout.add_window(window.clone(), width, false);
if window.communicate() {
- self.layout.update_window(&window);
+ self.layout.update_window(window.id());
}
self.windows.push(window);
}
@@ -159,9 +159,9 @@ impl Layout {
width: Option<ColumnWidth>,
) {
self.layout
- .add_window_right_of(right_of, window.clone(), width, false);
+ .add_window_right_of(right_of.id(), window.clone(), width, false);
if window.communicate() {
- self.layout.update_window(&window);
+ self.layout.update_window(window.id());
}
self.windows.push(window);
}
@@ -183,7 +183,7 @@ impl TestCase for Layout {
self.layout.update_output_size(&self.output);
for win in &self.windows {
if win.communicate() {
- self.layout.update_window(win);
+ self.layout.update_window(win.id());
}
}
}