aboutsummaryrefslogtreecommitdiff
path: root/src/layout
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-11-23 11:27:27 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2024-11-23 15:07:35 +0300
commit6c5b92e5c0e0243d54f9637e5f23a3f6641ce55b (patch)
tree98fcc58c799b58f4ba7c42e8e30227bf59eb70ae /src/layout
parent38c515e12e51a5af381af75be734fa31c6cab711 (diff)
downloadniri-6c5b92e5c0e0243d54f9637e5f23a3f6641ce55b.tar.gz
niri-6c5b92e5c0e0243d54f9637e5f23a3f6641ce55b.tar.bz2
niri-6c5b92e5c0e0243d54f9637e5f23a3f6641ce55b.zip
Add interactive_move_onto_empty_output test
Tests the add_workspace_bottom() in Monitor::add_tile().
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/mod.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs
index 97a9f622..33d6411a 100644
--- a/src/layout/mod.rs
+++ b/src/layout/mod.rs
@@ -5724,6 +5724,36 @@ mod tests {
}
#[test]
+ fn interactive_move_onto_empty_output() {
+ let ops = [
+ Op::AddOutput(1),
+ Op::AddWindow {
+ id: 0,
+ bbox: Rectangle::from_loc_and_size((0, 0), (100, 200)),
+ min_max_size: Default::default(),
+ },
+ Op::InteractiveMoveBegin {
+ window: 0,
+ output_idx: 1,
+ px: 0.,
+ py: 0.,
+ },
+ Op::AddOutput(2),
+ Op::InteractiveMoveUpdate {
+ window: 0,
+ dx: 1000.,
+ dy: 0.,
+ output_idx: 2,
+ px: 0.,
+ py: 0.,
+ },
+ Op::InteractiveMoveEnd { window: 0 },
+ ];
+
+ check_ops(&ops);
+ }
+
+ #[test]
fn output_active_workspace_is_preserved() {
let ops = [
Op::AddOutput(1),