diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-28 12:06:22 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-30 20:12:37 +0300 |
| commit | 4ea4d2bd3bea5407c6ddc0ee33f55025ffc1bf38 (patch) | |
| tree | a1a0d3162e6411e141d0996c9f87f3d09a2562d0 /src/layout/mod.rs | |
| parent | 6c52077d922dce3a9b57c6785647b6befb700ac9 (diff) | |
| download | niri-4ea4d2bd3bea5407c6ddc0ee33f55025ffc1bf38.tar.gz niri-4ea4d2bd3bea5407c6ddc0ee33f55025ffc1bf38.tar.bz2 niri-4ea4d2bd3bea5407c6ddc0ee33f55025ffc1bf38.zip | |
layout: Add animate arg to move_floating_window()
Diffstat (limited to 'src/layout/mod.rs')
| -rw-r--r-- | src/layout/mod.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs index ed92fad3..0e068499 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -2755,6 +2755,7 @@ impl<W: LayoutElement> Layout<W> { id: Option<&W::Id>, x: PositionChange, y: PositionChange, + animate: bool, ) { if let Some(InteractiveMoveState::Moving(move_)) = &mut self.interactive_move { if id.is_none() || id == Some(move_.tile.window().id()) { @@ -2771,7 +2772,7 @@ impl<W: LayoutElement> Layout<W> { let Some(workspace) = workspace else { return; }; - workspace.move_floating_window(id, x, y); + workspace.move_floating_window(id, x, y, animate); } pub fn focus_output(&mut self, output: &Output) { @@ -4450,6 +4451,7 @@ mod tests { x: PositionChange, #[proptest(strategy = "arbitrary_position_change()")] y: PositionChange, + animate: bool, }, SetParent { #[proptest(strategy = "1..=5usize")] @@ -4975,9 +4977,9 @@ mod tests { Op::SwitchFocusFloatingTiling => { layout.switch_focus_floating_tiling(); } - Op::MoveFloatingWindow { id, x, y } => { + Op::MoveFloatingWindow { id, x, y, animate } => { let id = id.filter(|id| layout.has_window(id)); - layout.move_floating_window(id.as_ref(), x, y); + layout.move_floating_window(id.as_ref(), x, y, animate); } Op::SetParent { id, |
