diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-08-13 18:45:02 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-08-14 15:58:59 +0300 |
| commit | 25c1c0434907ebee85b1e9df5fd5ef60fa1a15fd (patch) | |
| tree | 48abd9be3e77cfdf36d8a35604835bd183f8af1f /src/layout/tests | |
| parent | 36af02ad34efb3be9184d1d0449fc1ab42c432ca (diff) | |
| download | niri-25c1c0434907ebee85b1e9df5fd5ef60fa1a15fd.tar.gz niri-25c1c0434907ebee85b1e9df5fd5ef60fa1a15fd.tar.bz2 niri-25c1c0434907ebee85b1e9df5fd5ef60fa1a15fd.zip | |
layout: Offset ongoing column X move anims for non-animated resizes
Diffstat (limited to 'src/layout/tests')
| -rw-r--r-- | src/layout/tests/animations.rs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/layout/tests/animations.rs b/src/layout/tests/animations.rs index 00101195..bae2d512 100644 --- a/src/layout/tests/animations.rs +++ b/src/layout/tests/animations.rs @@ -989,16 +989,14 @@ fn width_resize_and_cancel() { check_ops_on_layout(&mut layout, &ops); // Since the resize animation is cancelled, the width goes to the new value immediately. The X - // position doesn't jump, instead the animation is offset to preserve the current position. - // - // FIXME: this is not currently the case! + // position doesn't jump, instead the animation is restarted to preserve the current position. assert_snapshot!(format_tiles(&layout), @r" 100 × 100 at x: 0 y: 0 - 200 × 200 at x: 5 y: 0 + 200 × 200 at x:105 y: 0 "); // Advance to the end of the move animation. - Op::AdvanceAnimations { msec_delta: 950 }.apply(&mut layout); + Op::AdvanceAnimations { msec_delta: 1000 }.apply(&mut layout); // Final state. assert_snapshot!(format_tiles(&layout), @r" @@ -1081,16 +1079,14 @@ fn width_resize_and_cancel_of_column_to_the_left() { check_ops_on_layout(&mut layout, &ops); // Since the resize animation is cancelled, the width goes to the new value immediately. The X - // position doesn't jump, instead the animation is offset to preserve the current position. - // - // FIXME: this is not currently the case! + // position doesn't jump, instead the animation is restarted to preserve the current position. assert_snapshot!(format_tiles(&layout), @r" - 100 × 100 at x: 95 y: 0 + 100 × 100 at x: -5 y: 0 200 × 200 at x:100 y: 0 "); // Advance to the end of the move animation. - Op::AdvanceAnimations { msec_delta: 950 }.apply(&mut layout); + Op::AdvanceAnimations { msec_delta: 1000 }.apply(&mut layout); // Final state. assert_snapshot!(format_tiles(&layout), @r" |
