mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-21 02:01:55 +07:00
layout/tests: Add CompleteAnimations op
This commit is contained in:
@@ -614,6 +614,7 @@ enum Op {
|
||||
#[proptest(strategy = "arbitrary_msec_delta()")]
|
||||
msec_delta: i32,
|
||||
},
|
||||
CompleteAnimations,
|
||||
MoveWorkspaceToOutput(#[proptest(strategy = "1..=5usize")] usize),
|
||||
ViewOffsetGestureBegin {
|
||||
#[proptest(strategy = "1..=5usize")]
|
||||
@@ -1401,6 +1402,11 @@ impl Op {
|
||||
layout.clock.set_unadjusted(now);
|
||||
layout.advance_animations();
|
||||
}
|
||||
Op::CompleteAnimations => {
|
||||
layout.clock.set_complete_instantly(true);
|
||||
layout.advance_animations();
|
||||
layout.clock.set_complete_instantly(false);
|
||||
}
|
||||
Op::MoveWorkspaceToOutput(id) => {
|
||||
let name = format!("output{id}");
|
||||
let Some(output) = layout.outputs().find(|o| o.name() == name).cloned() else {
|
||||
|
||||
Reference in New Issue
Block a user