From ded793dc071f4b9013a109f8d4a6176c373607df Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sun, 9 Aug 2026 15:28:21 +0300 Subject: [PATCH] layout: Add animate_move_from_with_config() --- src/layout/scrolling.rs | 12 ++++++++++-- src/layout/tile.rs | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/layout/scrolling.rs b/src/layout/scrolling.rs index 02dd2a7e..d2305cae 100644 --- a/src/layout/scrolling.rs +++ b/src/layout/scrolling.rs @@ -4203,8 +4203,16 @@ impl Column { } pub fn animate_move_from(&mut self, from: Point) { - self.animate_move_x_from(from.x); - self.animate_move_y_from(from.y); + self.animate_move_from_with_config(from, self.options.animations.window_movement.0); + } + + pub fn animate_move_from_with_config( + &mut self, + from: Point, + config: niri_config::Animation, + ) { + self.animate_move_x_from_with_config(from.x, config); + self.animate_move_y_from_with_config(from.y, config); } pub fn animate_move_x_from(&mut self, from_x_offset: f64) { diff --git a/src/layout/tile.rs b/src/layout/tile.rs index 86c7ebad..49fa2692 100644 --- a/src/layout/tile.rs +++ b/src/layout/tile.rs @@ -573,8 +573,16 @@ impl Tile { } pub fn animate_move_from(&mut self, from: Point) { - self.animate_move_x_from(from.x); - self.animate_move_y_from(from.y); + self.animate_move_from_with_config(from, self.options.animations.window_movement.0); + } + + pub fn animate_move_from_with_config( + &mut self, + from: Point, + config: niri_config::Animation, + ) { + self.animate_move_x_from_with_config(from.x, config); + self.animate_move_y_from_with_config(from.y, config); } pub fn animate_move_x_from(&mut self, from: f64) {