diff --git a/src/shell/layout/tiling/mod.rs b/src/shell/layout/tiling/mod.rs index bbb5ffb8..ff32a950 100644 --- a/src/shell/layout/tiling/mod.rs +++ b/src/shell/layout/tiling/mod.rs @@ -895,6 +895,12 @@ impl TilingLayout { .into_iter() .map(|child_id| (other_desc.node.clone(), child_id.clone())) .collect::>(); + let mut other_children = other_node + .children() + .into_iter() + .map(|child_id| (this_desc.node.clone(), child_id.clone())) + .collect::>(); + while !this_children.is_empty() { for (parent_id, child_id) in std::mem::take(&mut this_children) { let new_children = this_tree @@ -935,12 +941,6 @@ impl TilingLayout { } } - let other_node = other_tree.get_mut(&other_desc.node).ok()?; - let mut other_children = other_node - .children() - .into_iter() - .map(|child_id| (this_desc.node.clone(), child_id.clone())) - .collect::>(); while !other_children.is_empty() { for (parent_id, child_id) in std::mem::take(&mut other_children) { let new_children = other_tree